Skip to content

Commit 43fd29f

Browse files
committed
forgot one var declaration
1 parent 91ed8ab commit 43fd29f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • services/tone_analyzer

services/tone_analyzer/v3.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports = function (RED) {
3838
var message = '';
3939

4040
if (!msg.payload) {
41-
var message = 'Missing property: msg.payload';
41+
message = 'Missing property: msg.payload';
4242
node.error(message, msg);
4343
return;
4444
}
@@ -70,13 +70,12 @@ module.exports = function (RED) {
7070

7171
if (hasJSONmethod === true) {
7272
if (msg.payload.toJSON().type === 'Buffer') {
73-
isBuffer=true;
73+
isBuffer = true;
7474
}
7575
}
7676

7777
// Payload (text to be analysed) must be a string (content is either raw string or Buffer)
78-
if (typeof msg.payload === 'string' || isBuffer === true )
79-
{
78+
if (typeof msg.payload === 'string' || isBuffer === true ) {
8079
var options = {
8180
text: msg.payload,
8281
sentences: sentences,

0 commit comments

Comments
 (0)