mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -233,9 +233,12 @@ module.exports = function(RED) {
|
||||
// only replace if they match exactly
|
||||
RED.util.setMessageProperty(msg,property,value);
|
||||
} else {
|
||||
// if target is boolean then just replace it
|
||||
if (rule.tot === "bool") { current = value; }
|
||||
else { current = current.replace(fromRE,value); }
|
||||
current = current.replace(fromRE,value);
|
||||
if (rule.tot === "bool" && current === ""+value) {
|
||||
// If the target type is boolean, and the replace call has resulted in "true"/"false",
|
||||
// convert to boolean type (which 'value' already is)
|
||||
current = value
|
||||
}
|
||||
RED.util.setMessageProperty(msg,property,current);
|
||||
}
|
||||
} else if ((typeof current === 'number' || current instanceof Number) && fromType === 'num') {
|
||||
|
Reference in New Issue
Block a user