mirror of https://github.com/tooot-app/app
Fix crashes
This commit is contained in:
parent
5551cd0e12
commit
57efc4c868
|
@ -15,8 +15,8 @@ const TimelineFullConversation = () => {
|
|||
return queryKey &&
|
||||
queryKey[1].page !== 'Toot' &&
|
||||
status.in_reply_to_account_id &&
|
||||
(status.mentions.length === 0 ||
|
||||
status.mentions.filter(mention => mention.id !== status.in_reply_to_account_id).length) ? (
|
||||
(status.mentions?.length === 0 ||
|
||||
status.mentions?.filter(mention => mention.id !== status.in_reply_to_account_id).length) ? (
|
||||
<CustomText
|
||||
fontStyle='S'
|
||||
style={{
|
||||
|
|
|
@ -22,7 +22,7 @@ const HeaderSharedReplies: React.FC = () => {
|
|||
excludeMentions &&
|
||||
(excludeMentions.current =
|
||||
mentionsBeginning?.length && status?.mentions
|
||||
? status.mentions.filter(mention => mentionsBeginning.includes(`@${mention.username}`))
|
||||
? status.mentions?.filter(mention => mentionsBeginning.includes(`@${mention.username}`))
|
||||
: [])
|
||||
|
||||
return excludeMentions?.current.length ? (
|
||||
|
|
|
@ -197,7 +197,7 @@ const menuStatus = ({
|
|||
hidden:
|
||||
!ownAccount &&
|
||||
queryKey[1].page !== 'Notifications' &&
|
||||
!status.mentions.find(
|
||||
!status.mentions?.find(
|
||||
mention => mention.acct === accountAcct && mention.username === accountAcct
|
||||
) &&
|
||||
!status.muted
|
||||
|
|
|
@ -96,10 +96,10 @@ const Collections: React.FC = () => {
|
|||
iconBack='chevron-right'
|
||||
title={t('screenTabs:me.stacks.push.name')}
|
||||
content={
|
||||
typeof instancePush.global === 'boolean'
|
||||
typeof instancePush?.global === 'boolean'
|
||||
? t('screenTabs:me.root.push.content', {
|
||||
defaultValue: 'false',
|
||||
context: instancePush.global.toString()
|
||||
context: instancePush?.global.toString()
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
|
|
|
@ -19,5 +19,5 @@ export const appendRemote = {
|
|||
_remote: true
|
||||
}),
|
||||
mentions: (mentions: Mastodon.Mention[]) =>
|
||||
mentions.map(mention => ({ ...mention, _remote: true }))
|
||||
mentions?.map(mention => ({ ...mention, _remote: true }))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue