diff options
author | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-07-10 13:28:21 -0400 |
---|---|---|
committer | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-07-10 13:28:21 -0400 |
commit | 376eb907e68be8408f12fe79dd23a6e5f46ffe60 (patch) | |
tree | 1e56480951e0b940dd47b98412eb2bc3c6351946 /src/client/views/nodes/PDFBox.tsx | |
parent | 8922b3de6fcd53d5a09e719b2885e94ddb069c76 (diff) | |
parent | f23ea0cbde3c4193b8039f317fe71d965c8cbf40 (diff) |
Merge branch 'master' into zach-starter
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 7a89b143b..8db68ddfe 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -655,9 +655,11 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { ); else { if (!PDFBox.pdfpromise.get(href)) PDFBox.pdfpromise.set(href, Pdfjs.getDocument(href).promise); - PDFBox.pdfpromise.get(href)?.then((pdf: any) => { - PDFBox.pdfcache.set(href, (this._pdf = pdf)); - }); + PDFBox.pdfpromise.get(href)?.then( + action((pdf: any) => { + PDFBox.pdfcache.set(href, (this._pdf = pdf)); + }) + ); } } return pdfView ?? this.renderTitleBox; |