We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91ed8ab commit 43fd29fCopy full SHA for 43fd29f
1 file changed
services/tone_analyzer/v3.js
@@ -38,7 +38,7 @@ module.exports = function (RED) {
38
var message = '';
39
40
if (!msg.payload) {
41
- var message = 'Missing property: msg.payload';
+ message = 'Missing property: msg.payload';
42
node.error(message, msg);
43
return;
44
}
@@ -70,13 +70,12 @@ module.exports = function (RED) {
70
71
if (hasJSONmethod === true) {
72
if (msg.payload.toJSON().type === 'Buffer') {
73
- isBuffer=true;
+ isBuffer = true;
74
75
76
77
// 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
- {
+ if (typeof msg.payload === 'string' || isBuffer === true ) {
80
var options = {
81
text: msg.payload,
82
sentences: sentences,
0 commit comments