web-mech / badwords

A javascript filter for badwords
MIT License
631 stars 324 forks source link

Single words that are not profane will cause an error. #119

Closed dmrobbins03 closed 1 year ago

dmrobbins03 commented 3 years ago

If a match fails, RegExp.prototype.exec() returns null. This causes the application to crash. Added a catch for null.

u01jmg3 commented 3 years ago

Similar to #95