web-mech / badwords

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

Cannot read property '0' of null #103

Open scibuff opened 3 years ago

scibuff commented 3 years ago
const s = "["

filter.clean(s)
TypeError: Cannot read property '0' of null
    at Filter.clean (........\node_modules\bad-words\lib\badwords.js:58:41)
aroman commented 3 years ago

also fails on ":)"

aroman commented 3 years ago

Looks like there's an open PR that would fix this: https://github.com/web-mech/badwords/pull/95

@web-mech any chance that can be merged?

0933322888 commented 2 years ago

+1 to catch the error