浏览代码

fix: workflow end node deletion (#4240)

zxhlyh 11 月之前
父节点
当前提交
f49c99937c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      web/app/components/workflow/hooks/use-nodes-interactions.ts

+ 2 - 2
web/app/components/workflow/hooks/use-nodes-interactions.ts

@@ -893,14 +893,14 @@ export const useNodesInteractions = () => {
     } = store.getState()
 
     const nodes = getNodes()
-    const bundledNodes = nodes.filter(node => node.data._isBundled && node.data.type !== BlockEnum.Start && node.data.type !== BlockEnum.End)
+    const bundledNodes = nodes.filter(node => node.data._isBundled && node.data.type !== BlockEnum.Start)
 
     if (bundledNodes.length) {
       bundledNodes.forEach(node => handleNodeDelete(node.id))
       return
     }
 
-    const selectedNode = nodes.find(node => node.data.selected && node.data.type !== BlockEnum.Start && node.data.type !== BlockEnum.End)
+    const selectedNode = nodes.find(node => node.data.selected && node.data.type !== BlockEnum.Start)
 
     if (selectedNode)
       handleNodeDelete(selectedNode.id)