diff --git a/web/pdf_find_controller.js b/web/pdf_find_controller.js index e48246fa3..56d0d4e09 100644 --- a/web/pdf_find_controller.js +++ b/web/pdf_find_controller.js @@ -13,11 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* globals PDFFindBar, PDFJS, FindStates, FirefoxCom, Promise */ 'use strict'; -/* globals PDFFindBar, PDFJS, FindStates, FirefoxCom, Promise */ - /** * Provides a "search" or "find" functionality for the PDF. * This object actually performs the search for a given string. @@ -157,8 +156,9 @@ var PDFFindController = { self.pageContents.push(str); extractTextPromisesResolves[pageIndex](pageIndex); - if ((pageIndex + 1) < self.pdfPageSource.pages.length) + if ((pageIndex + 1) < self.pdfPageSource.pages.length) { extractPageText(pageIndex + 1); + } } ); }