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) {
|
||||
if (connection && isValid) {
|
||||
onConnect?.(connection);
|
||||
if (prevClosestHandle) {
|
||||
if (connection && isValid) {
|
||||
onConnect?.(connection);
|
||||
}
|
||||
}
|
||||
|
||||
// it's important to get a fresh reference from the store here
|
||||
|
||||
Reference in New Issue
Block a user