diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js index 102374c29..1f4cf0ae9 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/editor.js @@ -658,17 +658,19 @@ RED.editor = (function() { list.each(function(i) { var entry = $(this); var item = entry.data('data'); - var name = item.parent?item.name:entry.find(".node-input-env-name").val(); - var valueInput = entry.find(".node-input-env-value"); - var value = valueInput.typedInput("value"); - var type = valueInput.typedInput("type"); - if (!item.parent || (item.parent.value !== value || item.parent.type !== type)) { - var item = { - name: name, - type: type, - value: value - }; - env.push(item); + var name = (item.parent?item.name:entry.find(".node-input-env-name").val()).trim(); + if (name !== "") { + var valueInput = entry.find(".node-input-env-value"); + var value = valueInput.typedInput("value"); + var type = valueInput.typedInput("type"); + if (!item.parent || (item.parent.value !== value || item.parent.type !== type)) { + var item = { + name: name, + type: type, + value: value + }; + env.push(item); + } } }); return env;