From 7abd5312c9df0cbd403080d6cc00761e4760c8fd Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Mon, 6 Jan 2025 05:15:49 -0800 Subject: [PATCH] Fix loop block label update bug (#1496) --- .../src/routes/workflows/editor/workflowEditorUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts index a45ca4d7..c4f19466 100644 --- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts +++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts @@ -1194,10 +1194,11 @@ function getUpdatedNodesAfterLabelUpdateForParameterKeys( ...node, data: { ...node.data, - loopValue: - node.data.loopValue === getOutputParameterKey(oldLabel) + label: node.id === id ? newLabel : node.data.label, + loopVariableReference: + node.data.loopVariableReference === getOutputParameterKey(oldLabel) ? getOutputParameterKey(newLabel) - : node.data.loopValue, + : node.data.loopVariableReference, }, }; }