1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Wait until saving has finished before resetting PDFViewerApplication._saveInProgress (PR 12137 follow-up)

I obviously missed this during review, but currently `PDFViewerApplication._saveInProgress` is reset *synchronously* in `PDFViewerApplication.save`.
That was probably not intended, since it essentially renders the `PDFViewerApplication._saveInProgress` check pointless given that the actual saving is an *asynchronous* operation.
This commit is contained in:
Jonas Jenwald 2020-08-13 12:48:51 +02:00
parent e50cb4c9d5
commit 22cb59e7d0

View file

@ -939,8 +939,10 @@ const PDFViewerApplication = {
})
.catch(() => {
this.download();
}); // Error occurred, try downloading with the URL.
this._saveInProgress = false;
})
.finally(() => {
this._saveInProgress = false;
});
},
/**