From c9d7e72a086b5ca311411a0d41b47252cce152ed Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 21 Sep 2023 21:35:23 -0300 Subject: [PATCH] clone deep to avoid ctrl-z bug on ungroup component --- src/frontend/src/utils/reactflowUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/utils/reactflowUtils.ts b/src/frontend/src/utils/reactflowUtils.ts index 70ed7c42d..b7a48aec3 100644 --- a/src/frontend/src/utils/reactflowUtils.ts +++ b/src/frontend/src/utils/reactflowUtils.ts @@ -818,7 +818,7 @@ export function expandGroupNode( groupNode: NodeDataType, ReactFlowInstance: ReactFlowInstance ) { - const { template } = groupNode.node!; + const { template } = _.cloneDeep(groupNode.node!); const { flow } = groupNode.node!; const gNodes: NodeType[] = _.cloneDeep(flow!.data!.nodes); const gEdges = flow!.data!.edges;