mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fix crashes
This commit is contained in:
@ -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(
|
||||
|
@ -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') ||
|
||||
|
Reference in New Issue
Block a user