Parcourir la source

fix: workflow delete edge when node is selected (#4414)

zxhlyh il y a 11 mois
Parent
commit
c0fe414e0a
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      web/app/components/workflow/hooks/use-nodes-interactions.ts

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

@@ -922,8 +922,13 @@ export const useNodesInteractions = () => {
 
     const {
       getNodes,
+      edges,
     } = store.getState()
 
+    const edgeSelected = edges.some(edge => edge.selected)
+    if (edgeSelected)
+      return
+
     const nodes = getNodes()
     const bundledNodes = nodes.filter(node => node.data._isBundled && node.data.type !== BlockEnum.Start)