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) {