fix broken js lint
This commit is contained in:
parent
13a40d2f99
commit
f10520a5f2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue