Add fetch** functions in the XRefWrapper

It could fail to not have them if they're used during writing.
This commit is contained in:
Calixte Denizet 2026-03-05 19:21:02 +01:00
parent 4d0709c174
commit 150c1e80c2
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F

View File

@ -71,6 +71,18 @@ class XRefWrapper {
fetch(ref) {
return ref instanceof Ref ? this.entries[ref.num] : ref;
}
fetchIfRefAsync(ref) {
return Promise.resolve(this.fetch(ref));
}
fetchIfRef(ref) {
return this.fetch(ref);
}
fetchAsync(ref) {
return Promise.resolve(this.fetch(ref));
}
}
class PDFEditor {