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

Fix crashes

This commit is contained in:
Zhiyuan Zheng
2022-01-31 00:31:57 +01:00
parent bd49caa52a
commit 60f0a838cc
5 changed files with 35 additions and 12379 deletions

View File

@ -72,7 +72,7 @@ const Timeline: React.FC<Props> = ({
})
const flattenData = data?.pages
? data.pages.flatMap(page => [...page.body])
? data.pages?.flatMap(page => [...page.body])
: []
const ItemSeparatorComponent = useCallback(

View File

@ -108,10 +108,10 @@ const TimelineAttachment = React.memo(
)
default:
if (
attachment.preview_url.endsWith('.jpg') ||
attachment.preview_url.endsWith('.jpeg') ||
attachment.preview_url.endsWith('.png') ||
attachment.preview_url.endsWith('.gif') ||
attachment.preview_url?.endsWith('.jpg') ||
attachment.preview_url?.endsWith('.jpeg') ||
attachment.preview_url?.endsWith('.png') ||
attachment.preview_url?.endsWith('.gif') ||
attachment.remote_url?.endsWith('.jpg') ||
attachment.remote_url?.endsWith('.jpeg') ||
attachment.remote_url?.endsWith('.png') ||