fix: fix null exception on community page (#1504)

This commit is contained in:
Nolan Lawson 2019-09-21 13:43:45 -07:00 committed by GitHub
parent 2b4edee216
commit 5332a4e1e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,11 +2,12 @@ import { store } from '../_store/store'
import { cacheFirstUpdateAfter } from '../_utils/sync'
import { database } from '../_database/database'
import { getFollowRequests } from '../_api/followRequests'
import { get } from '../_utils/lodash-lite'
export async function updateFollowRequestCountIfLockedAccount (instanceName) {
const { verifyCredentials, loggedInInstances } = store.get()
if (!verifyCredentials[instanceName].locked) {
if (!get(verifyCredentials, [instanceName, 'locked'])) {
return
}