Skip to content

Commit bd81d39

Browse files
Merge pull request #19888 from Snuffleupagus/rm-BasePdfManager-catalog-getter
Remove the `BasePdfManager.prototype.catalog` getter
2 parents 91bfe12 + b3e1680 commit bd81d39

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/core/pdf_manager.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ class BasePdfManager {
9595
return this._docBaseUrl;
9696
}
9797

98-
get catalog() {
99-
return this.pdfDocument.catalog;
100-
}
101-
10298
ensureDoc(prop, args) {
10399
return this.ensure(this.pdfDocument, prop, args);
104100
}

src/core/struct_tree.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class StructTreeRoot {
118118
pdfManager,
119119
changes,
120120
}) {
121-
const root = pdfManager.catalog.cloneDict();
121+
const root = await pdfManager.ensureCatalog("cloneDict");
122122
const cache = new RefSetCache();
123123
cache.put(catalogRef, root);
124124

0 commit comments

Comments
 (0)