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
This commit is contained in:
Chocobozzz 2020-03-24 11:51:15 +01:00 committed by muxator
parent 8c4625ec50
commit 94ff21e25c

View file

@ -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);
}
}