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