regression(edges): Edge update also triggering new connection
# What's changed? * Fix edge update causing double connections * Fix updateEdge utility adding two edges on update
This commit is contained in:
@@ -160,8 +160,8 @@ export default (store: Store = useVueFlow().store) => {
|
||||
const isOwnHandle = connection.source === connection.target
|
||||
|
||||
if (isValid && !isOwnHandle) {
|
||||
store.hooks.connect.trigger(connection)
|
||||
onEdgeUpdate?.(connection)
|
||||
if (!onEdgeUpdate) store.hooks.connect.trigger(connection)
|
||||
else onEdgeUpdate(connection)
|
||||
}
|
||||
|
||||
store.hooks.connectEnd.trigger(event)
|
||||
|
||||
Reference in New Issue
Block a user