From 150c1e80c2b1a77e61e5987e5c6636f58dce305c Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 5 Mar 2026 19:21:02 +0100 Subject: [PATCH] Add fetch** functions in the XRefWrapper It could fail to not have them if they're used during writing. --- src/core/editor/pdf_editor.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core/editor/pdf_editor.js b/src/core/editor/pdf_editor.js index d164be252..aca8649b8 100644 --- a/src/core/editor/pdf_editor.js +++ b/src/core/editor/pdf_editor.js @@ -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 {