From f94db675fb87daf6c3678e0838e395ecea70e085 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 3 Jun 2025 22:37:03 +0800 Subject: [PATCH] fix: could not add branches in workflows --- ui/src/domain/workflow.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ui/src/domain/workflow.ts b/ui/src/domain/workflow.ts index 0a71749b..6ebb7c97 100644 --- a/ui/src/domain/workflow.ts +++ b/ui/src/domain/workflow.ts @@ -483,10 +483,6 @@ export const cloneNode = (sourceNode: WorkflowNode): WorkflowNode => { }; export const addNode = (root: WorkflowNode, targetNode: WorkflowNode, previousNodeId: string) => { - if (isBranchNode(targetNode)) { - throw new Error("Cannot add a branch node directly. Use `addBranch` instead."); - } - return produce(root, (draft) => { let current = draft; while (current) {