mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
client: Fix flakiness when changing language on desktop
This commit is contained in:
@@ -30,7 +30,7 @@ class AppContext extends Component {
|
||||
*/
|
||||
async earlyInit() {
|
||||
await options.initializedPromise;
|
||||
initLocale();
|
||||
await initLocale();
|
||||
}
|
||||
|
||||
setLayout(layout) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import glob from "./services/glob.js";
|
||||
import { t } from "./services/i18n.js";
|
||||
|
||||
bundleService.getWidgetBundlesByParent().then(async widgetBundles => {
|
||||
appContext.earlyInit();
|
||||
await appContext.earlyInit();
|
||||
|
||||
// A dynamic import is required for layouts since they initialize components which require translations.
|
||||
const DesktopLayout = (await import("./layouts/desktop_layout.js")).default;
|
||||
|
||||
Reference in New Issue
Block a user