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