mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +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:
parent
e50cb4c9d5
commit
22cb59e7d0
1 changed files with 4 additions and 2 deletions
|
@ -939,8 +939,10 @@ const PDFViewerApplication = {
|
|||
})
|
||||
.catch(() => {
|
||||
this.download();
|
||||
}); // Error occurred, try downloading with the URL.
|
||||
this._saveInProgress = false;
|
||||
})
|
||||
.finally(() => {
|
||||
this._saveInProgress = false;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue