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

Update 31-tcpin.js (#1235)

TCP-IN: Add check to see if object exists, fixes issue #1222
This commit is contained in:
Nathanaël Lécaudé 2017-04-18 11:03:16 -04:00 committed by Dave Conway-Jones
parent d1c42262d6
commit e574f4516f

View File

@ -461,8 +461,10 @@ module.exports = function(RED) {
}
}
else if (node.splitc === 0) {
clients[connection_id].msg.payload = data;
node.send(clients[connection_id].msg);
if (clients[connection_id]) {
clients[connection_id].msg.payload = data;
node.send(clients[connection_id].msg);
}
}
else {
for (var j = 0; j < data.length; j++ ) {