Use existing page count in nextMatch

This commit is contained in:
Fil Zembowicz 2014-10-02 08:57:01 -04:00
parent 4275481e08
commit dcb931dbe0

View File

@ -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) {