fix(core): check if prevClosestHandle exists in onPointerUp
This commit is contained in:
@@ -154,8 +154,10 @@ export function handlePointerDown({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onPointerUp(event: MouseEvent | TouchEvent) {
|
function onPointerUp(event: MouseEvent | TouchEvent) {
|
||||||
if (connection && isValid) {
|
if (prevClosestHandle) {
|
||||||
onConnect?.(connection);
|
if (connection && isValid) {
|
||||||
|
onConnect?.(connection);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// it's important to get a fresh reference from the store here
|
// it's important to get a fresh reference from the store here
|
||||||
|
|||||||
Reference in New Issue
Block a user