aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/screens/profile/IndividualMoment.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx
index a322b1e9..0fd15b2c 100644
--- a/src/screens/profile/IndividualMoment.tsx
+++ b/src/screens/profile/IndividualMoment.tsx
@@ -49,7 +49,7 @@ const IndividualMoment: React.FC<IndividualMomentProps> = ({route}) => {
const viewabilityConfigCallback = useRef(
(info: {viewableItems: ViewToken[]; changed: ViewToken[]}) => {
const index = info.viewableItems[0].index;
- if (index !== null) {
+ if (index !== null && momentData.length > 0) {
setCurrentVisibleMomentId(momentData[index].moment_id);
}
},