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

Fix crash

This commit is contained in:
Zhiyuan Zheng
2021-04-11 11:25:40 +02:00
parent 81ffaabcdc
commit 4df121e01a
3 changed files with 23 additions and 24 deletions

View File

@ -152,14 +152,16 @@ const TimelinePoll: React.FC<Props> = ({
</Text>
)
} else {
return (
<Text style={[styles.expiration, { color: theme.secondary }]}>
<Trans
i18nKey='componentTimeline:shared.poll.meta.expiration.until'
components={[<RelativeTime date={poll.expires_at} />]}
/>
</Text>
)
if (poll.expires_at) {
return (
<Text style={[styles.expiration, { color: theme.secondary }]}>
<Trans
i18nKey='componentTimeline:shared.poll.meta.expiration.until'
components={[<RelativeTime date={poll.expires_at} />]}
/>
</Text>
)
}
}
}, [mode, i18n.language, poll.expired, poll.expires_at])