fix: failed to load side menus

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/633/head
Ryan Wang 2022-09-30 16:38:13 +08:00
parent e13b4977bd
commit 7e08350da5
1 changed files with 10 additions and 3 deletions

View File

@ -201,13 +201,20 @@ async function initApp() {
try {
loadCoreModules();
await loadPluginModules();
try {
await loadPluginModules();
} catch (e) {
console.error("Failed to load plugins", e);
}
await loadCurrentUser();
app.provide<MenuGroupType[]>("menus", menus);
app.provide<MenuItemType[]>("minimenus", minimenus);
} catch (e) {
console.error(e);
} finally {
app.provide<MenuGroupType[]>("menus", menus);
app.provide<MenuItemType[]>("minimenus", minimenus);
app.use(router);
app.mount("#app");
}