Fix web crash (#7426)

This commit is contained in:
dan
2025-01-10 20:39:22 +00:00
committed by GitHub
parent 6ca97406c1
commit 08c6ac7c89
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ export function Inner() {
setTrendingDisabled(true)
}, [setTrendingDisabled])
const drawerGesture = useContext(DrawerGestureContext)!
const drawerGesture = useContext(DrawerGestureContext) ?? Gesture.Native() // noop for web
const trendingScrollGesture =
Gesture.Native().blocksExternalGesture(drawerGesture)
+1 -1
View File
@@ -130,7 +130,7 @@ export const Pager = forwardRef<PagerRef, React.PropsWithChildren<Props>>(
[parentOnPageScrollStateChanged],
)
const drawerGesture = useContext(DrawerGestureContext)!
const drawerGesture = useContext(DrawerGestureContext) ?? Gesture.Native() // noop for web
const nativeGesture =
Gesture.Native().requireExternalGestureToFail(drawerGesture)