Skip to content

Commit

Permalink
Move the Preferences initialization as early as possible
Browse files Browse the repository at this point in the history
Given that the entire default viewer initialization depends on the preferences being available, try to do this as early as possible.
  • Loading branch information
Snuffleupagus committed Jul 21, 2024
1 parent e92a6a1 commit f8aa15a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const PDFViewerApplication = {
/** @type {OverlayManager} */
overlayManager: null,
/** @type {Preferences} */
preferences: null,
preferences: new Preferences(),
/** @type {Toolbar} */
toolbar: null,
/** @type {SecondaryToolbar} */
Expand Down Expand Up @@ -638,7 +638,6 @@ const PDFViewerApplication = {
},

async run(config) {
this.preferences = new Preferences();
await this.initialize(config);

const { appConfig, eventBus } = this;
Expand Down

0 comments on commit f8aa15a

Please sign in to comment.