add check for property to trigger (temporary fix for debug)

This commit is contained in:
Dave Conway-Jones 2018-02-01 13:47:36 +00:00
parent 42b5635485
commit 419019a656
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
1 changed files with 4 additions and 1 deletions

View File

@ -120,7 +120,10 @@ module.exports = function(RED) {
if (node.op2type === "flow" || node.op2type === "global") {
node.topics[topic].m2 = RED.util.evaluateNodeProperty(node.op2,node.op2type,node,msg);
}
msg2.payload = node.topics[topic].m2;
if (node.topics.hasOwnProperty(topic)) {
msg2.payload = node.topics[topic].m2;
}
else { node.error("No topic:"+topic,msg); } // temporary fix to try to get more data.
}
delete node.topics[topic];
node.status({});