mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-08 05:29:51 +00:00
fix: could not add branches in workflows
This commit is contained in:
parent
e6cf4d3e07
commit
f94db675fb
@ -483,10 +483,6 @@ export const cloneNode = (sourceNode: WorkflowNode): WorkflowNode => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const addNode = (root: WorkflowNode, targetNode: WorkflowNode, previousNodeId: string) => {
|
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) => {
|
return produce(root, (draft) => {
|
||||||
let current = draft;
|
let current = draft;
|
||||||
while (current) {
|
while (current) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user