From 942b17b8071e315c2bbfc196e8b9b67aed5e14ce Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 3 Jan 2022 21:51:49 +0000 Subject: [PATCH] Fix incorrect clearing of blank payload property in Inject node Fixes #3316 --- .../node_modules/@node-red/nodes/core/common/20-inject.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/common/20-inject.html b/packages/node_modules/@node-red/nodes/core/common/20-inject.html index 2cbf274ce..a5dcb061a 100644 --- a/packages/node_modules/@node-red/nodes/core/common/20-inject.html +++ b/packages/node_modules/@node-red/nodes/core/common/20-inject.html @@ -690,9 +690,9 @@ this.topic = ""; var result = getProps(items, true); this.props = result.props; - if(result.payloadType) { this.payloadType = result.payloadType; }; - if(result.payload) { this.payload = result.payload; }; - if(result.topic) { this.topic = result.topic; }; + if(result.hasOwnProperty('payloadType')) { this.payloadType = result.payloadType; }; + if(result.hasOwnProperty('payload')) { this.payload = result.payload; }; + if(result.hasOwnProperty('topic')) { this.topic = result.topic; }; }, button: { enabled: function() {