1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix Sentry reported crashes

This commit is contained in:
xmflsct
2022-10-27 22:51:02 +02:00
parent db6b5e4e70
commit e5f750c3c8
11 changed files with 44 additions and 80 deletions

View File

@ -21,8 +21,7 @@ import FlashMessage from 'react-native-flash-message'
import {
Directions,
FlingGestureHandler,
LongPressGestureHandler,
State
LongPressGestureHandler
} from 'react-native-gesture-handler'
import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom'
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context'
@ -142,7 +141,7 @@ const ScreenImagesViewer = ({
const onViewableItemsChanged = useCallback(
({ viewableItems }: { viewableItems: ViewToken[] }) => {
setCurrentIndex(viewableItems[0].index || 0)
setCurrentIndex(viewableItems[0]?.index || 0)
},
[]
)