fix: workflow delete edge (#3541)

This commit is contained in:
zxhlyh
2024-04-17 11:09:43 +08:00
committed by GitHub
parent 6269e011db
commit 2e27425e93
2 changed files with 7 additions and 1 deletions

View File

@@ -820,8 +820,14 @@ export const useNodesInteractions = () => {
const {
getNodes,
edges,
} = store.getState()
const currentEdgeIndex = edges.findIndex(edge => edge.selected)
if (currentEdgeIndex > -1)
return
const nodes = getNodes()
const nodesToDelete = nodes.filter(node => node.data.selected)