Skip to content

Automate browser based workflows with AI

Fix loop block label update bug (#1496)

Shuchang Zheng7abd5312c9df
diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts
index a45ca4d7c..c4f19466d 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,
},
};
}