1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Daemon node. Check payload length rather than trim to handle buffer

to close #242
thanks @gbrault
This commit is contained in:
Dave Conway-Jones 2016-10-17 21:35:12 +01:00
parent 8efc1e5fc8
commit f63d8d6343
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ module.exports = function(RED) {
} }
line = bits[0]; line = bits[0];
} else { } else {
if (data && data.trim() !== "") { if (data && (data.length !== 0)) {
node.send([{payload:data},null,null]); node.send([{payload:data},null,null]);
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-daemon", "name" : "node-red-node-daemon",
"version" : "0.0.7", "version" : "0.0.8",
"description" : "A Node-RED node that runs and monitors a long running system command.", "description" : "A Node-RED node that runs and monitors a long running system command.",
"dependencies" : { "dependencies" : {
}, },