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

Strip off env property if it is empty - avoid inflated flow files

This commit is contained in:
Nick O'Leary 2021-10-28 12:14:34 +01:00
parent 0f0cb3ac6d
commit b8ad6475e1
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1097,6 +1097,11 @@ RED.nodes = (function() {
// Until we know how that can happen, add a filter here to remove them // Until we know how that can happen, add a filter here to remove them
node.nodes = node.nodes.filter(function(n) { return !!n }).map(function(n) { return n.id }); node.nodes = node.nodes.filter(function(n) { return !!n }).map(function(n) { return n.id });
} }
if (n.type === "tab" || n.type === "group") {
if (node.env && node.env.length === 0) {
delete node.env;
}
}
if (n._def.category != "config") { if (n._def.category != "config") {
node.x = n.x; node.x = n.x;
node.y = n.y; node.y = n.y;