From f8ed9cebebfa445fc0b5d321df5b6caaef77b803 Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Thu, 12 Dec 2013 20:48:10 +0000 Subject: [PATCH] make error message reflect missing module... ie just badwords... not badwords/regexp --- analysis/swearfilter/74-swearfilter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/analysis/swearfilter/74-swearfilter.js b/analysis/swearfilter/74-swearfilter.js index 135c9455..394bca40 100644 --- a/analysis/swearfilter/74-swearfilter.js +++ b/analysis/swearfilter/74-swearfilter.js @@ -15,6 +15,8 @@ **/ var RED = require(process.env.NODE_RED_HOME+"/red/red"); +var badwords = require('badwords'); +if (badwords.length == 0 ) { return; } var badwordsRegExp = require('badwords/regexp'); function BadwordsNode(n) {