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:
parent
91bfe12f38
commit
b3e16800f5
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user