From 401af044b4229b2fb22ab8c9c184e642cd61bef9 Mon Sep 17 00:00:00 2001 From: Celal Zamanoglu <95054566+celalzamanoglu@users.noreply.github.com> Date: Fri, 12 Dec 2025 17:40:16 +0300 Subject: [PATCH] fix conditional serialization to drop stale targets for deleted downstream/branch blocks (#4282) --- .../routes/workflows/editor/workflowEditorUtils.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts index c220eb1f..ad6934a0 100644 --- a/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts +++ b/skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts @@ -775,10 +775,7 @@ function serializeConditionalBlock( nodes: Array, edges: Array, ): ConditionalBlockYAML { - const mergeLabel = - findConditionalMergeLabel(node, nodes, edges) ?? - node.data.mergeLabel ?? - null; + const mergeLabel = findConditionalMergeLabel(node, nodes, edges) ?? null; const branchConditions = node.data.branches.map((branch) => { const orderedNodes = getConditionalBranchNodeSequence( @@ -787,11 +784,7 @@ function serializeConditionalBlock( nodes, edges, ); - const nextBlockLabel = - orderedNodes[0]?.data.label ?? - mergeLabel ?? - branch.next_block_label ?? - null; + const nextBlockLabel = orderedNodes[0]?.data.label ?? mergeLabel ?? null; return { ...branch,