diff --git a/lib/badwords.js b/lib/badwords.js index 4da86ad..a02d0d4 100644 --- a/lib/badwords.js +++ b/lib/badwords.js @@ -66,7 +66,7 @@ class Filter { this.list.push(...words); words.forEach((word) => { - if (!!~this.exclude.indexOf(word)) { + if (this.exclude.includes(word)) { this.exclude.splice(this.exclude.indexOf(word), 1); } });