fix(edges): use filter to remove orphaned edges
This commit is contained in:
@@ -60,7 +60,7 @@ export default (state: State): ComputedGetters => {
|
|||||||
|
|
||||||
if (!source || !target) {
|
if (!source || !target) {
|
||||||
console.warn(`[vue-flow]: Orphaned edge ${e.id} will be removed.`)
|
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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user