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 40d19a811..2a7b440f2 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 @@ -2406,6 +2406,13 @@ RED.nodes = (function() { } else { delete n.g } + // If importing into a subflow, ensure an outbound-link doesn't get added + if (activeSubflow && /^link /.test(n.type) && n.links) { + n.links = n.links.filter(function(id) { + const otherNode = node_map[id] || RED.nodes.node(id); + return (otherNode && otherNode.z === activeWorkspace); + }); + } for (var d3 in n._def.defaults) { if (n._def.defaults.hasOwnProperty(d3)) { if (n._def.defaults[d3].type) { @@ -2429,14 +2436,6 @@ RED.nodes = (function() { } } } - // If importing into a subflow, ensure an outbound-link doesn't - // get added - if (activeSubflow && /^link /.test(n.type) && n.links) { - n.links = n.links.filter(function(id) { - const otherNode = node_map[id] || RED.nodes.node(id); - return (otherNode && otherNode.z === activeWorkspace) - }); - } } for (i=0;i v+v + }, { + name: "g1", + id: "group1", + env: [ + { + name: 'jsonEnvVar', + type: 'json', + value: '{"a":1}' + } + ] + }) + await group.start() + const result = group.getSetting('jsonEnvVar') + result.should.have.property('a', 1) + result.a = 2 + result.b = 'hello' + + const result2 = group.getSetting('jsonEnvVar') + result2.should.have.property('a', 1) + result2.should.not.have.property('b') + + }) it("delegates to parent if not found", async function () { const group = new Group({ getSetting: v => v+v