1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #18470 from Snuffleupagus/move-Preferences-init

Move the `Preferences` initialization as early as possible
This commit is contained in:
Tim van der Meij 2024-07-21 14:40:07 +02:00 committed by GitHub
commit 9f62c0f139
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;