fix: userInfo being initialized correctly (#963)

This commit is contained in:
Peng Xiao 2023-02-13 16:56:32 +08:00 committed by GitHub
parent 49e60737a8
commit 98ceb082fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,9 @@ export const AppStateProvider = ({
await createDefaultWorkspace(dataCenter);
}
setUser(
(await dataCenter.getUserInfo(dataCenter.providers[0]?.id)) || null
(await dataCenter.getUserInfo(
dataCenter.providers.filter(p => p.id !== 'local')[0]?.id
)) || null
);
setAppState({
dataCenter,