From 682345da2244d76bccff12059c9e650686a9c452 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 25 Jun 2016 21:44:10 +0100 Subject: [PATCH] Inject node should reuse the message it is triggered with Closes #914 --- nodes/core/core/20-inject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/core/20-inject.js b/nodes/core/core/20-inject.js index 2b55203f4..d31cf7c3d 100644 --- a/nodes/core/core/20-inject.js +++ b/nodes/core/core/20-inject.js @@ -51,7 +51,7 @@ module.exports = function(RED) { this.on("input",function(msg) { try { - msg = {topic:this.topic}; + msg.topic = this.topic; if ( (this.payloadType == null && this.payload === "") || this.payloadType === "date") { msg.payload = Date.now(); } else if (this.payloadType == null) {