mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Remove unnecessary pageLabel length-check in the viewer
Given how the pageLabel array is defined, see 1ab9a6e36e/src/core/catalog.js (L627)
, it shouldn't be necessary to check the length in the viewer.
This commit is contained in:
parent
1ab9a6e36e
commit
c85cd80b1b
1 changed files with 0 additions and 6 deletions
|
@ -1632,12 +1632,6 @@ const PDFViewerApplication = {
|
|||
return;
|
||||
}
|
||||
const numLabels = labels.length;
|
||||
if (numLabels !== this.pagesCount) {
|
||||
console.error(
|
||||
"The number of Page Labels does not match the number of pages in the document."
|
||||
);
|
||||
return;
|
||||
}
|
||||
let i = 0;
|
||||
// Ignore page labels that correspond to standard page numbering.
|
||||
while (i < numLabels && labels[i] === (i + 1).toString()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue