Fix loading order of permissions/modules (#5150)

Fixes #5130
This commit is contained in:
Rijk van Zanten
2021-04-19 11:23:05 -04:00
committed by GitHub
parent 30b16cca89
commit 6b71398fc5

View File

@@ -61,8 +61,8 @@ export async function hydrate(stores = useStores()) {
await userStore.hydrate();
if (userStore.state.currentUser?.role) {
await registerModules();
await Promise.all(stores.filter(({ id }) => id !== 'userStore').map((store) => store.hydrate?.()));
await registerModules();
await setLanguage((userStore.state.currentUser?.language as Language) || 'en-US');
}
} catch (error) {