From 7aca53b1a4f79dadcb551b5fb5eabb4eda886a1e Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Fri, 21 Sep 2018 16:11:59 +0200 Subject: [PATCH] Remove the find bar's dependency on the find controller Pull request #10100 removed the last usage of the find controller from the find bar, so we can drop the dependency now. --- web/app.js | 1 - web/pdf_find_bar.js | 6 ------ 2 files changed, 7 deletions(-) diff --git a/web/app.js b/web/app.js index 3ff363ba1..3f2dfc95b 100644 --- a/web/app.js +++ b/web/app.js @@ -369,7 +369,6 @@ let PDFViewerApplication = { // TODO: improve `PDFFindBar` constructor parameter passing let findBarConfig = Object.create(appConfig.findBar); - findBarConfig.findController = this.findController; findBarConfig.eventBus = eventBus; this.findBar = new PDFFindBar(findBarConfig, this.l10n); diff --git a/web/pdf_find_bar.js b/web/pdf_find_bar.js index 61362099f..b1696b5c9 100644 --- a/web/pdf_find_bar.js +++ b/web/pdf_find_bar.js @@ -38,15 +38,9 @@ class PDFFindBar { this.findResultsCount = options.findResultsCount || null; this.findPreviousButton = options.findPreviousButton || null; this.findNextButton = options.findNextButton || null; - this.findController = options.findController || null; this.eventBus = options.eventBus; this.l10n = l10n; - if (this.findController === null) { - throw new Error('PDFFindBar cannot be used without a ' + - 'PDFFindController instance.'); - } - // Add event listeners to the DOM elements. this.toggleButton.addEventListener('click', () => { this.toggle();