Fix downloading the current pdf

This commit is contained in:
Calixte Denizet 2026-03-05 10:36:58 +01:00
parent 4d0709c174
commit dd52343d58
No known key found for this signature in database
GPG Key ID: 0C5442631EE0691F

View File

@ -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()