mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #4457 from node-red/4456-fix-group-in-subflow-lookup
Ensure subflow instances keep track of their groups
This commit is contained in:
		@@ -73,9 +73,20 @@ class Subflow extends Flow {
 | 
			
		||||
            id: subflowInstance.id,
 | 
			
		||||
            configs: {},
 | 
			
		||||
            nodes: {},
 | 
			
		||||
            groups: {},
 | 
			
		||||
            subflows: {}
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (subflowDef.groups) {
 | 
			
		||||
            // Clone all of the subflow group definitions and give them new IDs
 | 
			
		||||
            for (i in subflowDef.groups) {
 | 
			
		||||
                if (subflowDef.groups.hasOwnProperty(i)) {
 | 
			
		||||
                    node = createNodeInSubflow(subflowInstance.id,subflowDef.groups[i]);
 | 
			
		||||
                    node_map[node._alias] = node;
 | 
			
		||||
                    subflowInternalFlowConfig.groups[node.id] = node;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (subflowDef.configs) {
 | 
			
		||||
            // Clone all of the subflow config node definitions and give them new IDs
 | 
			
		||||
            for (i in subflowDef.configs) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user