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

Merge pull request #3311 from node-red/strip-empty-env

Avoid adding empty env properties to tabs/groups
This commit is contained in:
Nick O'Leary 2022-01-04 18:57:53 +00:00 committed by GitHub
commit e76000b713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,9 @@
}
});
}
if (!isSameObj(old_env, new_env)) {
if (!old_env && new_env.length === 0) {
delete node.env;
} else if (!isSameObj(old_env, new_env)) {
editState.changes.env = node.env;
if (new_env.length === 0) {
delete node.env;