mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Do not save subflow env vars with blank names
This commit is contained in:
parent
87a815fd6f
commit
04bdcbd490
@ -658,7 +658,8 @@ RED.editor = (function() {
|
|||||||
list.each(function(i) {
|
list.each(function(i) {
|
||||||
var entry = $(this);
|
var entry = $(this);
|
||||||
var item = entry.data('data');
|
var item = entry.data('data');
|
||||||
var name = item.parent?item.name:entry.find(".node-input-env-name").val();
|
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 valueInput = entry.find(".node-input-env-value");
|
||||||
var value = valueInput.typedInput("value");
|
var value = valueInput.typedInput("value");
|
||||||
var type = valueInput.typedInput("type");
|
var type = valueInput.typedInput("type");
|
||||||
@ -670,6 +671,7 @@ RED.editor = (function() {
|
|||||||
};
|
};
|
||||||
env.push(item);
|
env.push(item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return env;
|
return env;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user