mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-07 13:09:51 +00:00
Merge pull request #760 from fudiwei/bugfix
bugfix: could not add branches in workflows
This commit is contained in:
commit
2203bb5268
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user