mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle false values in $env() properly
Fixes 2517
This commit is contained in:
parent
9b6e798eb6
commit
1018c0e8a5
@ -566,7 +566,11 @@ function prepareJSONataExpression(value,node) {
|
||||
});
|
||||
expr.assign('env', function(name) {
|
||||
var val = getSetting(node, name);
|
||||
return (val ? val : "");
|
||||
if (typeof val !== 'undefined') {
|
||||
return val;
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
})
|
||||
expr.registerFunction('clone', cloneMessage, '<(oa)-:o>');
|
||||
expr._legacyMode = /(^|[^a-zA-Z0-9_'"])msg([^a-zA-Z0-9_'"]|$)/.test(value);
|
||||
|
Loading…
Reference in New Issue
Block a user