mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix subflow outbound-link filter
This commit is contained in:
		| @@ -2406,12 +2406,15 @@ 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); | ||||
|                 }); | ||||
|             // If importing a subflow, ensure an outbound-link doesn't get added | ||||
|             if (/^link /.test(n.type) && n.links) { | ||||
|                 const isSubflow = !!getSubflow(n.z); | ||||
|                 if (isSubflow) { | ||||
|                     n.links = n.links.filter(function(id) { | ||||
|                         const otherNode = node_map[id] || RED.nodes.node(id); | ||||
|                         return (otherNode && otherNode.z === n.z); | ||||
|                     }); | ||||
|                 } | ||||
|             } | ||||
|             for (var d3 in n._def.defaults) { | ||||
|                 if (n._def.defaults.hasOwnProperty(d3)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user