chore: Update proxy IDs on group node outputs to ensure consistency
This commit is contained in:
parent
e5b7477a90
commit
ee9212e8ee
1 changed files with 13 additions and 0 deletions
|
|
@ -1117,6 +1117,18 @@ export function updateProxyIdsOnTemplate(
|
|||
});
|
||||
}
|
||||
|
||||
export function updateProxyIdsOnOutputs(
|
||||
outputs: OutputFieldType[] | undefined,
|
||||
idsMap: { [key: string]: string },
|
||||
) {
|
||||
if(!outputs) return;
|
||||
outputs.forEach((output) => {
|
||||
if (output.proxy && idsMap[output.proxy.id]) {
|
||||
output.proxy.id = idsMap[output.proxy.id];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function updateEdgesIds(
|
||||
edges: Edge[],
|
||||
idsMap: { [key: string]: string },
|
||||
|
|
@ -1485,6 +1497,7 @@ export function updateGroupRecursion(groupNode: NodeType, edges: Edge[]) {
|
|||
let newFlow = groupNode.data.node!.flow;
|
||||
const idsMap = updateIds(newFlow.data!);
|
||||
updateProxyIdsOnTemplate(groupNode.data.node!.template, idsMap);
|
||||
updateProxyIdsOnOutputs(groupNode.data.node.outputs, idsMap);
|
||||
let flowEdges = edges;
|
||||
updateEdgesIds(flowEdges, idsMap);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue