diff --git a/io/serialport/25-serial.js b/io/serialport/25-serial.js index b03dd4e9..fde04163 100644 --- a/io/serialport/25-serial.js +++ b/io/serialport/25-serial.js @@ -233,9 +233,9 @@ module.exports = function(RED) { else { payload = payload.toString(); } - if ((spliton === "char") && (addchar !== "")) { payload += addchar; } + if (addchar !== "") { payload += addchar; } } - else if ((spliton === "char") && (addchar !== "")) { + else if (addchar !== "") { payload = Buffer.concat([payload,addchar]); } return payload; diff --git a/io/serialport/package.json b/io/serialport/package.json index d2ec4449..8e17f563 100644 --- a/io/serialport/package.json +++ b/io/serialport/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-serialport", - "version" : "0.8.5", + "version" : "0.8.6", "description" : "Node-RED nodes to talk to serial ports", "dependencies" : { "serialport" : "^7.1.5"