Skip to content

Commit

Permalink
refactor(*): substitute use of bitwise operator in favor of array inc…
Browse files Browse the repository at this point in the history
…ludes
  • Loading branch information
web-mech committed Oct 23, 2018
1 parent a845180 commit f506659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/badwords.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit f506659

Please sign in to comment.