File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/react-native-gesture-handler/src/web Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -701,7 +701,13 @@ export default abstract class GestureHandler implements IGestureHandler {
701
701
}
702
702
703
703
const rect = this . delegate . measureView ( ) ;
704
- const { x, y } = this . tracker . getLastAbsoluteCoords ( ) ;
704
+ const lastCoords = this . tracker . getLastAbsoluteCoords ( ) ;
705
+
706
+ if ( ! lastCoords ) {
707
+ return false ;
708
+ }
709
+
710
+ const { x, y } = lastCoords ;
705
711
const offsetX : number = x - rect . pageX ;
706
712
const offsetY : number = y - rect . pageY ;
707
713
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export default class PointerEventManager extends EventManager<HTMLElement> {
98
98
// pointer moves until it succeeds.
99
99
// God, I do love web development.
100
100
if (
101
- ! target . hasPointerCapture ( event . pointerId ) &&
101
+ ! target ? .hasPointerCapture ( event . pointerId ) &&
102
102
! POINTER_CAPTURE_EXCLUDE_LIST . has ( target . tagName )
103
103
) {
104
104
target . setPointerCapture ( event . pointerId ) ;
You can’t perform that action at this time.
0 commit comments