1
0
Fork 0
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:
Tim van der Meij 2021-12-08 19:58:46 +01:00 committed by GitHub
commit b178985615
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}