From dd52343d584fdc8f976e78e18cf9d94ddc5dab2e Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Thu, 5 Mar 2026 10:36:58 +0100 Subject: [PATCH] Fix downloading the current pdf --- web/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/app.js b/web/app.js index d5ace13c0..d9865a230 100644 --- a/web/app.js +++ b/web/app.js @@ -1316,9 +1316,10 @@ const PDFViewerApplication = { const { classList } = this.appConfig.appContainer; classList.add("wait"); - const structuralChanges = this.pdfThumbnailViewer?.getStructuralChanges(); - if (structuralChanges) { - await this.onSavePages({ data: structuralChanges }); + if (this.pdfThumbnailViewer?.hasStructuralChanges()) { + await this.onSavePages({ + data: this.pdfThumbnailViewer.getStructuralChanges(), + }); } else { await (this.pdfDocument?.annotationStorage.size > 0 ? this.save()