WebUI: enforce strict comparison operators

This commit is contained in:
Chocobo1
2024-04-21 14:11:21 +08:00
parent 75e2ae2fa0
commit 4945ed576a
19 changed files with 70 additions and 68 deletions

View File

@@ -61,13 +61,14 @@ window.qBittorrent.MultiRename = (function() {
let matches = [];
do {
result = regex.exec(str);
if (result === null)
break;
if (result == null) { break; }
matches.push(result);
// regex assertions don't modify lastIndex,
// so we need to explicitly break out to prevent infinite loop
if (lastIndex == regex.lastIndex) {
if (lastIndex === regex.lastIndex) {
break;
}
else {