Skip to content

Commit

Permalink
feat: 修复分支节点创建时限制逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojunnanya committed Dec 4, 2024
1 parent 3adb31c commit bc30b14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/components/FlowNode/FlowNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function FlowNode(_: any, ref: any) {

// 拿到点击创建的当前节点,查看当前节点的下一个节点是否为是条件节点
const nestNode = (parentNode ? parentNode.children : nodeList)[node.index + 1];
if (nestNode.type === 'condition' && type === 'condition') {
if (nestNode && nestNode.type === 'condition' && type === 'condition') {
message.error('分支节点前一个节点不能添加分支节点');
return;
}
Expand Down

0 comments on commit bc30b14

Please sign in to comment.