mirror of
https://github.com/tooot-app/app
synced 2025-04-16 11:17:29 +02:00
Fix accounts array empty not init
This commit is contained in:
parent
30be3cdb15
commit
76d4bc754b
@ -184,7 +184,7 @@ const ComponentInstance: React.FC<Props> = ({
|
||||
)
|
||||
|
||||
if (!account) {
|
||||
setGlobalStorage('accounts', accounts?.concat([accountKey]))
|
||||
setGlobalStorage('accounts', (accounts || []).concat([accountKey]))
|
||||
}
|
||||
setAccount(accountKey)
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user