From f8aa15aae99977405936ea4461eb0222db351bf1 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 21 Jul 2024 13:42:31 +0200 Subject: [PATCH] Move the `Preferences` initialization as early as possible Given that the entire default viewer initialization depends on the preferences being available, try to do this as early as possible. --- web/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/app.js b/web/app.js index 7ac0a383061ee..30cf816446802 100644 --- a/web/app.js +++ b/web/app.js @@ -139,7 +139,7 @@ const PDFViewerApplication = { /** @type {OverlayManager} */ overlayManager: null, /** @type {Preferences} */ - preferences: null, + preferences: new Preferences(), /** @type {Toolbar} */ toolbar: null, /** @type {SecondaryToolbar} */ @@ -638,7 +638,6 @@ const PDFViewerApplication = { }, async run(config) { - this.preferences = new Preferences(); await this.initialize(config); const { appConfig, eventBus } = this;