1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Allow subflow instance to override env var with falsey values

Fixes #2113
This commit is contained in:
Nick O'Leary 2019-03-28 13:33:54 +00:00
parent dd89ea3731
commit 9832394f8e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -571,13 +571,13 @@ RED.editor = (function() {
}); });
valueField.typedInput('type', opt.parent?(opt.type||opt.parent.type):opt.type); valueField.typedInput('type', opt.parent?(opt.type||opt.parent.type):opt.type);
valueField.typedInput('value', opt.parent?(opt.value||opt.parent.value):opt.value); valueField.typedInput('value', opt.parent?((opt.value !== undefined)?opt.value:opt.parent.value):opt.value);
var actionButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(container); var actionButton = $('<a/>',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(container);
$('<i/>',{class:"fa "+(opt.parent?"fa-reply":"fa-remove")}).appendTo(actionButton); $('<i/>',{class:"fa "+(opt.parent?"fa-reply":"fa-remove")}).appendTo(actionButton);
container.parent().addClass("red-ui-editableList-item-removable"); container.parent().addClass("red-ui-editableList-item-removable");
if (opt.parent) { if (opt.parent) {
if (opt.value && (opt.value !== opt.parent.value || opt.type !== opt.parent.type)) { if ((opt.value !== undefined) && (opt.value !== opt.parent.value || opt.type !== opt.parent.type)) {
actionButton.show(); actionButton.show();
} else { } else {
actionButton.hide(); actionButton.hide();