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

Inject node should reuse the message it is triggered with

Closes #914
This commit is contained in:
Nick O'Leary 2016-06-25 21:44:10 +01:00
parent 82f289c42e
commit 682345da22

View File

@ -51,7 +51,7 @@ module.exports = function(RED) {
this.on("input",function(msg) { this.on("input",function(msg) {
try { try {
msg = {topic:this.topic}; msg.topic = this.topic;
if ( (this.payloadType == null && this.payload === "") || this.payloadType === "date") { if ( (this.payloadType == null && this.payload === "") || this.payloadType === "date") {
msg.payload = Date.now(); msg.payload = Date.now();
} else if (this.payloadType == null) { } else if (this.payloadType == null) {