fix(core): check if prevClosestHandle exists in pointer up
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -176,9 +176,11 @@ export default function useHandle({
|
||||
}
|
||||
|
||||
function onPointerUp(event: MouseEvent | TouchEvent) {
|
||||
if (connection && isValid) {
|
||||
if (!onEdgeUpdate) emits.connect({ ...(defaultEdgeOptions?.value || {}), ...connection })
|
||||
else onEdgeUpdate(connection)
|
||||
if (prevClosestHandle) {
|
||||
if (connection && isValid) {
|
||||
if (!onEdgeUpdate) emits.connect({ ...(defaultEdgeOptions?.value || {}), ...connection })
|
||||
else onEdgeUpdate(connection)
|
||||
}
|
||||
}
|
||||
|
||||
emits.connectEnd(event)
|
||||
|
||||
Reference in New Issue
Block a user