Skip to content

Commit

Permalink
revert ?. change for event.target calls
Browse files Browse the repository at this point in the history
  • Loading branch information
satelllte committed May 8, 2024
1 parent dc37a4d commit 2a277f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/src/demos/Lines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<PointerEvent>) => {
Expand All @@ -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()
}

Expand Down

0 comments on commit 2a277f3

Please sign in to comment.