diff --git a/web/app.js b/web/app.js index 209ad0360..912880dee 100644 --- a/web/app.js +++ b/web/app.js @@ -463,14 +463,9 @@ const PDFViewerApplication = { async _initializeViewerComponents() { const { appConfig, externalServices } = this; - let eventBus; - if (appConfig.eventBus) { - eventBus = appConfig.eventBus; - } else if (externalServices.isInAutomation) { - eventBus = new AutomationEventBus(); - } else { - eventBus = new EventBus(); - } + const eventBus = externalServices.isInAutomation + ? new AutomationEventBus() + : new EventBus(); this.eventBus = eventBus; this.overlayManager = new OverlayManager(); diff --git a/web/viewer.js b/web/viewer.js index 53fe840ac..ef73a0a2a 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -77,7 +77,6 @@ function getViewerConfiguration() { appContainer: document.body, mainContainer: document.getElementById("viewerContainer"), viewerContainer: document.getElementById("viewer"), - eventBus: null, toolbar: { container: document.getElementById("toolbarViewer"), numPages: document.getElementById("numPages"),