check for null and not false

This commit is contained in:
gnuxie 2022-07-18 16:36:47 +01:00
parent fe9edad1d3
commit 458c621f88

View File

@ -83,7 +83,7 @@ export class WordList extends Protection {
return
}
}
if (!Boolean(this.badWords)) {
if (this.badWords == null) {
// Create a mega-regex from all the tiny baby regexs
this.badWords = new RegExp(
"(" + mjolnir.config.protections.wordlist.words.join(")|(") + ")",