From 2a277f39fb3118f311eeabc8f71b33cb2585e036 Mon Sep 17 00:00:00 2001 From: Yehor <20585619+satelllte@users.noreply.github.com> Date: Wed, 8 May 2024 21:27:10 +0300 Subject: [PATCH] revert ?. change for event.target calls --- example/src/demos/Lines.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/src/demos/Lines.tsx b/example/src/demos/Lines.tsx index 6eca9144ed..2ea176b747 100644 --- a/example/src/demos/Lines.tsx +++ b/example/src/demos/Lines.tsx @@ -33,7 +33,7 @@ function useDrag(onDrag: any, onEnd: any) { toggle(false) event.stopPropagation() // @ts-expect-error - event.target?.setPointerCapture(event.pointerId) + event.target.setPointerCapture(event.pointerId) } const up = (event: ThreeEvent) => { @@ -42,7 +42,7 @@ function useDrag(onDrag: any, onEnd: any) { toggle(true) event.stopPropagation() // @ts-expect-error - event.target?.releasePointerCapture(event.pointerId) + event.target.releasePointerCapture(event.pointerId) if (onEnd) onEnd() }