diff --git a/packages/node_modules/@node-red/nodes/core/function/89-trigger.js b/packages/node_modules/@node-red/nodes/core/function/89-trigger.js index 0fc6ad6fb..16a00e99d 100644 --- a/packages/node_modules/@node-red/nodes/core/function/89-trigger.js +++ b/packages/node_modules/@node-red/nodes/core/function/89-trigger.js @@ -166,13 +166,7 @@ module.exports = function(RED) { if (err) { reject(err); } else { - if (node.op1type === "date") { - let d = new Date(); - if (node.op1 == "1") { msg.payload = Date.now(); } - else if (node.op1 == "iso") { msg.payload = d.toISOString(); } - else { msg.payload = d; } - } - else { msg.payload = value; } + msg.payload = value; resolve(); } }); @@ -219,12 +213,7 @@ module.exports = function(RED) { } else { msg2.payload = node.topics[topic].m2; - if (node.op2type === "date") { - let d = new Date(); - if (node.op2 == "0") { msg2.payload = Date.now(); } - else if (node.op2 == "iso") { msg2.payload = d.toISOString(); } - else { msg2.payload = d; } - } + if (node.op2type === "date") { msg2.payload = Date.now(); } if (node.second === true) { msgInfo.send([null,msg2]); } else { msgInfo.send(msg2); } }