Remove the BasePdfManager.prototype.catalog getter

This is only invoked *once* and it can be trivially replaced by the `ensureCatalog`-method, since the code where it's used is already asynchronous.
This commit is contained in:
Jonas Jenwald 2025-05-03 13:35:26 +02:00
parent 91bfe12f38
commit b3e16800f5
2 changed files with 1 additions and 5 deletions

View File

@ -95,10 +95,6 @@ class BasePdfManager {
return this._docBaseUrl;
}
get catalog() {
return this.pdfDocument.catalog;
}
ensureDoc(prop, args) {
return this.ensure(this.pdfDocument, prop, args);
}

View File

@ -118,7 +118,7 @@ class StructTreeRoot {
pdfManager,
changes,
}) {
const root = pdfManager.catalog.cloneDict();
const root = await pdfManager.ensureCatalog("cloneDict");
const cache = new RefSetCache();
cache.put(catalogRef, root);