mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Ensure subflow instances keep track of their groups
This commit is contained in:
parent
a55554193b
commit
fb54c05d9f
@ -73,9 +73,20 @@ class Subflow extends Flow {
|
|||||||
id: subflowInstance.id,
|
id: subflowInstance.id,
|
||||||
configs: {},
|
configs: {},
|
||||||
nodes: {},
|
nodes: {},
|
||||||
|
groups: {},
|
||||||
subflows: {}
|
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) {
|
if (subflowDef.configs) {
|
||||||
// Clone all of the subflow config node definitions and give them new IDs
|
// Clone all of the subflow config node definitions and give them new IDs
|
||||||
for (i in subflowDef.configs) {
|
for (i in subflowDef.configs) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user