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
@ -1632,12 +1632,6 @@ const PDFViewerApplication = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const numLabels = labels.length;
|
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;
|
let i = 0;
|
||||||
// Ignore page labels that correspond to standard page numbering.
|
// Ignore page labels that correspond to standard page numbering.
|
||||||
while (i < numLabels && labels[i] === (i + 1).toString()) {
|
while (i < numLabels && labels[i] === (i + 1).toString()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user