Skip to content

Commit

Permalink
Always set AppOptions.eventBus, regardless of build, to make local …
Browse files Browse the repository at this point in the history
…testing easier
  • Loading branch information
Snuffleupagus committed Oct 1, 2024
1 parent 2ae29ad commit 4f6b90d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,18 +376,16 @@ const PDFViewerApplication = {
async _initializeViewerComponents() {
const { appConfig, externalServices, l10n } = this;

let eventBus;
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
eventBus = AppOptions.eventBus = new FirefoxEventBus(
AppOptions.get("allowedGlobalEvents"),
externalServices,
AppOptions.get("isInAutomation")
);
} else {
eventBus = new EventBus();
}
const eventBus =
typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
? new FirefoxEventBus(
AppOptions.get("allowedGlobalEvents"),
externalServices,
AppOptions.get("isInAutomation")
)
: new EventBus();
this.eventBus = AppOptions.eventBus = eventBus;
this.mlManager?.setEventBus(eventBus, this._globalAbortController.signal);
this.eventBus = eventBus;

this.overlayManager = new OverlayManager();

Expand Down

0 comments on commit 4f6b90d

Please sign in to comment.