2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

fix broken js lint

This commit is contained in:
Neil Lalonde 2016-11-08 17:59:51 -05:00
parent 13a40d2f99
commit f10520a5f2

View file

@ -7,10 +7,7 @@ export function censor(text, censoredWords, censoredPattern) {
}
if (censoredPattern && censoredPattern.length > 0) {
try {
new RegExp(censoredPattern); // exception if invalid
patterns.push("(" + censoredPattern + ")");
} catch(e) {}
patterns.push("(" + censoredPattern + ")");
}
if (patterns.length) {