From f10520a5f2c6e72f3e032aa64aea62a60e6674d2 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 8 Nov 2016 17:59:51 -0500 Subject: [PATCH] fix broken js lint --- app/assets/javascripts/pretty-text/censored-words.js.es6 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/assets/javascripts/pretty-text/censored-words.js.es6 b/app/assets/javascripts/pretty-text/censored-words.js.es6 index e81032393f8..bc9aa59ee0e 100644 --- a/app/assets/javascripts/pretty-text/censored-words.js.es6 +++ b/app/assets/javascripts/pretty-text/censored-words.js.es6 @@ -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) {