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

Trigger - redo second output code update

This commit is contained in:
Dave Conway-Jones 2020-05-04 17:11:09 +01:00
parent 0edc57f0e3
commit 36b0698432
No known key found for this signature in database
GPG Key ID: 302A6725C594817F

View File

@ -191,17 +191,16 @@ module.exports = function(RED) {
}
promise.then(() => {
if (node.op2type === "payl") {
node.send(npay[topic]);
if (node.second === true) { node.send([null,npay[topic]]); }
else { node.send(npay[topic]); }
delete npay[topic];
}
else {
msg2.payload = node.topics[topic].m2;
node.send(msg2);
if (node.second === true) { node.send([null,msg2]); }
else { node.send(msg2); }
}
delete node.topics[topic];
if (node.second === true) { node.send([null,msg2]); }
else { node.send(msg2); }
node.status({});
}).catch(err => {
node.error(err);