diff options
author | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-06-06 11:33:46 -0400 |
---|---|---|
committer | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-06-06 11:33:46 -0400 |
commit | 453fc92d992d390599ca771da5f7016a091671ca (patch) | |
tree | 249d2a612b9562b9f618f494695b18e7280590e8 /src/client/views/nodes/PDFBox.tsx | |
parent | d3d2abbb011fe9c2a7d14b2a4b3016d55033aae8 (diff) | |
parent | 56de54fea88891b621d6298541bd0a26334b8db5 (diff) |
Merge branch 'master' into aisosa-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; |