Skip to content

Commit 6e31b0b

Browse files
authored
Fix possible web crashes (#3553)
## Description Without being able to reproduce, we saw some possible web crashed happening in react-native-gesture-handler. So adding more guards to avoid that Here are the sentry crashed : <img width="874" alt="Screenshot 2025-06-12 at 10 53 08" src="https://github.com/user-attachments/assets/1a372727-6f6b-40b8-b45f-2d0c19c0d999" /> <img width="880" alt="Screenshot 2025-06-12 at 11 02 58" src="https://github.com/user-attachments/assets/07d038bd-d780-4e83-a61e-867a9e12356e" />
1 parent 1e1f4e0 commit 6e31b0b

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)