WebUI: enforce parentheses around operators

PR #20696.
This commit is contained in:
Chocobo1
2024-04-15 12:50:07 +08:00
committed by GitHub
parent 6c82d5e305
commit d7cded54e4
12 changed files with 67 additions and 57 deletions

View File

@@ -76,7 +76,7 @@ window.qBittorrent.MultiRename = (function() {
// Maximum of 250 matches per file
++count;
} while (regex.global && count < 250);
} while (regex.global && (count < 250));
return matches;
};
@@ -182,7 +182,7 @@ window.qBittorrent.MultiRename = (function() {
break;
}
// Ignore rows without a match
if (!matches || matches.length == 0) {
if (!matches || (matches.length === 0)) {
continue;
}
@@ -219,7 +219,7 @@ window.qBittorrent.MultiRename = (function() {
},
rename: async function() {
if (!this.matchedFiles || this.matchedFiles.length === 0 || !this.hash) {
if (!this.matchedFiles || (this.matchedFiles.length === 0) || !this.hash) {
this.onRenamed([]);
return;
}