Skip to content

Commit

Permalink
clone message (test if this could be a workaround for #84)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed May 18, 2019
1 parent ab1fef1 commit e5ed264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/ccu-get-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = function (RED) {
}

this.on('input', msg => {
msg = RED.util.cloneMessage(msg);
let value;
const iface = msg.iface || config.iface;
const channel = msg.channel || config.channel.split(' ')[0];
Expand All @@ -26,7 +27,6 @@ module.exports = function (RED) {
}

this.status({fill: 'green', shape: 'ring', text: String(value.payload)});

if (config.setPropType === 'cmsg') {
Object.assign(msg, value);
this.send(msg);
Expand Down

0 comments on commit e5ed264

Please sign in to comment.