fix(edges): use filter to remove orphaned edges

This commit is contained in:
braks
2022-10-07 22:55:38 +02:00
committed by Braks
parent 8199a1c921
commit 1ad6073699
+1 -1
View File
@@ -60,7 +60,7 @@ export default (state: State): ComputedGetters => {
if (!source || !target) {
console.warn(`[vue-flow]: Orphaned edge ${e.id} will be removed.`)
state.edges.splice(state.edges.indexOf(e), 1)
state.edges = state.edges.filter((edge) => edge.id !== e.id)
return true
}