Merge pull request #760 from fudiwei/bugfix

bugfix: could not add branches in workflows
This commit is contained in:
RHQYZ
2025-06-03 23:48:13 +08:00
committed by GitHub

View File

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