mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Refactors nextPageMatch (nits)
This commit is contained in:
parent
187c9007ef
commit
48f0d0a131
1 changed files with 4 additions and 6 deletions
|
@ -296,11 +296,10 @@ var PDFFindController = {
|
|||
},
|
||||
|
||||
nextPageMatch: function() {
|
||||
if (this.resumePageIdx !== null)
|
||||
if (this.resumePageIdx !== null) {
|
||||
console.error('There can only be one pending page.');
|
||||
// done boolean to remove do-while construct per review of PR 4131
|
||||
var done = false;
|
||||
while (!done) {
|
||||
}
|
||||
do {
|
||||
var pageIdx = this.offset.pageIdx;
|
||||
var matches = this.pageMatches[pageIdx];
|
||||
if (!matches) {
|
||||
|
@ -309,8 +308,7 @@ var PDFFindController = {
|
|||
this.resumePageIdx = pageIdx;
|
||||
break;
|
||||
}
|
||||
done = this.matchesReady(matches);
|
||||
}
|
||||
} while (!this.matchesReady(matches));
|
||||
},
|
||||
|
||||
advanceOffsetPage: function(previous) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue