diff --git a/src/components/Instance/index.tsx b/src/components/Instance/index.tsx index 39718ce0..9b53312d 100644 --- a/src/components/Instance/index.tsx +++ b/src/components/Instance/index.tsx @@ -184,7 +184,7 @@ const ComponentInstance: React.FC = ({ ) if (!account) { - setGlobalStorage('accounts', accounts?.concat([accountKey])) + setGlobalStorage('accounts', (accounts || []).concat([accountKey])) } setAccount(accountKey) diff --git a/src/screens/Compose/Root/Header/PostingAs.tsx b/src/screens/Compose/Root/Header/PostingAs.tsx index cc79dbbe..4079b0ab 100644 --- a/src/screens/Compose/Root/Header/PostingAs.tsx +++ b/src/screens/Compose/Root/Header/PostingAs.tsx @@ -7,8 +7,8 @@ import { useTranslation } from 'react-i18next' import { View } from 'react-native' const ComposePostingAs = () => { - const accounts = useGlobalStorage.object('accounts') - if (!accounts.length) return null + const [accounts] = useGlobalStorage.object('accounts') + if (!accounts?.length) return null const { t } = useTranslation('screenCompose') const { colors } = useTheme()