mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Ensure node/group xrefs are consistent on import
This commit is contained in:
		| @@ -1442,7 +1442,15 @@ RED.nodes = (function() { | ||||
|                 return node_map[id]; | ||||
|             }) | ||||
|             // Just in case the group references a node that doesn't exist for some reason | ||||
|             n.nodes = n.nodes.filter(function(v) { return !!v}); | ||||
|             n.nodes = n.nodes.filter(function(v) { | ||||
|                 if (v) { | ||||
|                     // Repair any nodes that have forgotten they are in this group | ||||
|                     if (v.g !== n.id) { | ||||
|                         v.g = n.id; | ||||
|                     } | ||||
|                 } | ||||
|                 return !!v | ||||
|             }); | ||||
|             if (!n.g) { | ||||
|                 groupDepthMap[n.id] = 0; | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user