fix: workflow delete edge (#3541)

This commit is contained in:
zxhlyh 2024-04-17 11:09:43 +08:00 • committed by GitHub
commit 2e27425e93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)