mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-17 18:54:04 +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) {
|
||||
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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user