fix(edges): check if connection exists

This commit is contained in:
Braks
2022-05-27 23:36:01 +02:00
parent bae5d1e26d
commit 975d5519a4
@@ -135,7 +135,7 @@ const handleEdgeUpdater = (event: MouseEvent, edge: GraphEdge, isSourceHandle: b
undefined,
isSourceHandle ? 'target' : 'source',
(connection) => {
if (!connectionExists(edge, getEdges)) emits.edgeUpdate({ edge, connection })
if (!connectionExists(connection, getEdges)) emits.edgeUpdate({ edge, connection })
},
() => emits.edgeUpdateEnd({ event, edge }),
)