From 1967046cc829da3e7ad54c35c6241ae1b8c1ce5e Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Thu, 21 Nov 2013 08:47:34 +0000 Subject: [PATCH] Slight tweak to sentiment info to reflect reality. --- nodes/core/analysis/72-sentiment.html | 9 ++++----- nodes/core/analysis/72-sentiment.js | 11 +++++------ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/nodes/core/analysis/72-sentiment.html b/nodes/core/analysis/72-sentiment.html index 5f2dd1889..6d068075a 100644 --- a/nodes/core/analysis/72-sentiment.html +++ b/nodes/core/analysis/72-sentiment.html @@ -24,10 +24,10 @@ diff --git a/nodes/core/analysis/72-sentiment.js b/nodes/core/analysis/72-sentiment.js index 4345900b7..6a763b70f 100644 --- a/nodes/core/analysis/72-sentiment.js +++ b/nodes/core/analysis/72-sentiment.js @@ -19,14 +19,13 @@ var sentiment = require('sentiment'); function SentimentNode(n) { RED.nodes.createNode(this,n); + var node = this; this.on("input", function(msg) { - var node = this; - sentiment(msg.payload, function (err, result) { - msg.sentiment = result; - node.send(msg); - }); + sentiment(msg.payload, function (err, result) { + msg.sentiment = result; + node.send(msg); + }); }); } - RED.nodes.registerType("sentiment",SentimentNode);