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

Fix incorrect clearing of blank payload property in Inject node

Fixes #3316
This commit is contained in:
Nick O'Leary 2022-01-03 21:51:49 +00:00
parent 91cb6ba73b
commit 942b17b807
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -690,9 +690,9 @@
this.topic = ""; this.topic = "";
var result = getProps(items, true); var result = getProps(items, true);
this.props = result.props; this.props = result.props;
if(result.payloadType) { this.payloadType = result.payloadType; }; if(result.hasOwnProperty('payloadType')) { this.payloadType = result.payloadType; };
if(result.payload) { this.payload = result.payload; }; if(result.hasOwnProperty('payload')) { this.payload = result.payload; };
if(result.topic) { this.topic = result.topic; }; if(result.hasOwnProperty('topic')) { this.topic = result.topic; };
}, },
button: { button: {
enabled: function() { enabled: function() {