diff --git a/nodes/core/logic/15-change.js b/nodes/core/logic/15-change.js index b9b823d37..6a22f2585 100644 --- a/nodes/core/logic/15-change.js +++ b/nodes/core/logic/15-change.js @@ -21,8 +21,9 @@ module.exports = function(RED) { RED.nodes.createNode(this, n); this.rules = n.rules; + var rule; if (!this.rules) { - var rule = { + rule = { t:(n.action=="replace"?"set":n.action), p:n.property||"" } @@ -39,7 +40,7 @@ module.exports = function(RED) { var valid = true; for (var i=0;i