From b8ad6475e1e5b8d6f72d191b4852ef63b796e656 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 28 Oct 2021 12:14:34 +0100 Subject: [PATCH] Strip off env property if it is empty - avoid inflated flow files --- .../node_modules/@node-red/editor-client/src/js/nodes.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/nodes.js b/packages/node_modules/@node-red/editor-client/src/js/nodes.js index 76f544396..a7eea6caf 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/nodes.js +++ b/packages/node_modules/@node-red/editor-client/src/js/nodes.js @@ -1097,6 +1097,11 @@ RED.nodes = (function() { // 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 }); } + if (n.type === "tab" || n.type === "group") { + if (node.env && node.env.length === 0) { + delete node.env; + } + } if (n._def.category != "config") { node.x = n.x; node.y = n.y;