mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-25 00:17:21 +02:00
Add fetch** functions in the XRefWrapper
It could fail to not have them if they're used during writing.
This commit is contained in:
parent
4d0709c174
commit
150c1e80c2
@ -71,6 +71,18 @@ class XRefWrapper {
|
|||||||
fetch(ref) {
|
fetch(ref) {
|
||||||
return ref instanceof Ref ? this.entries[ref.num] : 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 {
|
class PDFEditor {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user