From dcb931dbe018db035346f8f4a1156edadde46a7a Mon Sep 17 00:00:00 2001 From: Fil Zembowicz Date: Thu, 2 Oct 2014 08:57:01 -0400 Subject: [PATCH] Use existing page count in nextMatch --- web/pdf_find_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pdf_find_controller.js b/web/pdf_find_controller.js index 1f887e902..1aa912109 100644 --- a/web/pdf_find_controller.js +++ b/web/pdf_find_controller.js @@ -257,7 +257,7 @@ var PDFFindController = (function PDFFindControllerClosure() { var offset = this.offset; // Keep track of how many pages we should maximally iterate through. - this.pagesToSearch = this.pdfViewer.pagesCount; + this.pagesToSearch = numPages; // If there's already a matchIdx that means we are iterating through a // page's matches. if (offset.matchIdx !== null) {