chore(connction-handler): cleanup

This commit is contained in:
moklick
2023-02-06 02:00:35 +01:00
parent 383a074aea
commit 230106da73
@@ -154,10 +154,8 @@ export function handlePointerDown({
} }
function onPointerUp(event: MouseEvent | TouchEvent) { function onPointerUp(event: MouseEvent | TouchEvent) {
if (prevClosestHandle) { if (prevClosestHandle && connection && isValid) {
if (connection && isValid) { onConnect?.(connection);
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