mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
let new typed-inputs return correctly
0 now returns correct type for boolean and number when required.
This commit is contained in:
parent
fb09f4b22d
commit
76e98f74fa
@ -153,7 +153,7 @@ function evaluateNodeProperty(value, type, node, msg) {
|
||||
if (type === 'str') {
|
||||
return ""+value;
|
||||
} else if (type === 'num') {
|
||||
return Number(value);
|
||||
return new Number(value);
|
||||
} else if (type === 'json') {
|
||||
return JSON.parse(value);
|
||||
} else if (type === 're') {
|
||||
@ -165,7 +165,7 @@ function evaluateNodeProperty(value, type, node, msg) {
|
||||
} else if (type === 'global' && node) {
|
||||
return node.context().global.get(value);
|
||||
} else if (type === 'bool') {
|
||||
return /^true$/i.test(value)
|
||||
return new Boolean(/^true$/i.test(value));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user