From 94ff21e25cd924cc10796f3aff8d2daaba5f5f8e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Mar 2020 11:51:15 +0100 Subject: [PATCH] PadManager: anchor the addPad regex to the start of the string This improves the performance a bit, and is more adherent to the logic of the application. --HG-- branch : padlist-use-set --- src/node/db/PadManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/db/PadManager.js b/src/node/db/PadManager.js index 23164a7a9..80283b1e8 100644 --- a/src/node/db/PadManager.js +++ b/src/node/db/PadManager.js @@ -59,7 +59,7 @@ let padList = { this.initiated = true; for (let val of dbData) { - this.addPad(val.replace(/pad:/,""), false); + this.addPad(val.replace(/^pad:/,""), false); } }