diff --git a/analysis/swearfilter/74-swearfilter.js b/analysis/swearfilter/74-swearfilter.js index e1a32568..f8b445b3 100644 --- a/analysis/swearfilter/74-swearfilter.js +++ b/analysis/swearfilter/74-swearfilter.js @@ -14,15 +14,15 @@ * limitations under the License. **/ -var RED = require("../../red/red"); +var RED = require(process.env.NODE_RED_HOME+"/red/red"); var badwords = require('badwords'); function BadwordsNode(n) { - RED.nodes.createNode(this,n); - var node = this; - this.on("input", function(msg) { - if (badwords.ok(msg.payload)) { node.send(msg); } - }); + RED.nodes.createNode(this,n); + var node = this; + this.on("input", function(msg) { + if (badwords.ok(msg.payload)) { node.send(msg); } + }); } RED.nodes.registerType("badwords",BadwordsNode); diff --git a/io/rawserial/26-rawserial.js b/io/rawserial/26-rawserial.js index 9bccefac..6fcefc2d 100644 --- a/io/rawserial/26-rawserial.js +++ b/io/rawserial/26-rawserial.js @@ -14,7 +14,7 @@ * limitations under the License. **/ -var RED = require("../../red/red"); +var RED = require(process.env.NODE_RED_HOME+"/red/red"); var settings = RED.settings; var util = require("util"); var fs = require('fs');