mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #14347 from Snuffleupagus/improve-pageKidsCountCache
Improve caching in `Catalog.getPageDict` (PR 8207 follow-up)
This commit is contained in:
commit
b178985615
1 changed files with 1 additions and 1 deletions
|
@ -1102,7 +1102,7 @@ class Catalog {
|
|||
if (isRef(currentNode)) {
|
||||
const count = pageKidsCountCache.get(currentNode);
|
||||
// Skip nodes where the page can't be.
|
||||
if (count > 0 && currentPageIndex + count < pageIndex) {
|
||||
if (count >= 0 && currentPageIndex + count <= pageIndex) {
|
||||
currentPageIndex += count;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue