Skip to content

Commit 76128a5

Browse files
committed
feat: configure control flows tasks
Signed-off-by: Simon Emms <simon@simonemms.com>
1 parent 7baf885 commit 76128a5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/routes/workflows/[...workflowId]/+page.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,12 @@
854854
const node = resolveNode(nodeId);
855855
if (!node) return;
856856
if (node.type === 'switch') {
857+
const hasDefault = node.branches.some((b) => b.condition === undefined);
857858
updateCurrentGraph((g) =>
858-
replaceNode(g, addSwitchBranch(node, 'new-branch')),
859+
replaceNode(
860+
g,
861+
addSwitchBranch(node, 'new-branch', hasDefault ? '' : undefined),
862+
),
859863
);
860864
} else if (node.type === 'fork') {
861865
updateCurrentGraph((g) =>

0 commit comments

Comments
 (0)