diff --git a/src/main.ts b/src/main.ts index 81f619106..c73e3e5fe 100644 --- a/src/main.ts +++ b/src/main.ts @@ -39,6 +39,10 @@ if (window.API_URL.slice(window.API_URL.length - 1, window.API_URL.length) === ' window.API_URL = window.API_URL.slice(0, window.API_URL.length - 1) } +// We're loading the language before creating the app so that it won't fail to load when the user's +// language file is not yet loaded. +await setLanguage() + const app = createApp(App) app.use(Notifications) @@ -107,6 +111,4 @@ app.use(pinia) app.use(router) app.use(i18n) -setLanguage().then(() => { - app.mount('#app') -}) \ No newline at end of file +app.mount('#app')