Skip to content

Commit 538ced5

Browse files
committed
Fix possible crash on web
1 parent df7cd90 commit 538ced5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-native-gesture-handler/src/web/tools/PointerEventManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default class PointerEventManager extends EventManager<HTMLElement> {
9898
// pointer moves until it succeeds.
9999
// God, I do love web development.
100100
if (
101-
!target.hasPointerCapture(event.pointerId) &&
101+
!target?.hasPointerCapture(event.pointerId) &&
102102
!POINTER_CAPTURE_EXCLUDE_LIST.has(target.tagName)
103103
) {
104104
target.setPointerCapture(event.pointerId);

0 commit comments

Comments
 (0)