mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #12285 from Snuffleupagus/sourceEventType-optional
Ensure that the `sourceEventType` parameter is actually optional in `PDFViewerApplication.{download, save}` (PR 12248 follow-up)
This commit is contained in:
commit
3e437ce63c
1 changed files with 3 additions and 3 deletions
|
@ -874,7 +874,7 @@ const PDFViewerApplication = {
|
|||
);
|
||||
},
|
||||
|
||||
download({ sourceEventType = "download" }) {
|
||||
download({ sourceEventType = "download" } = {}) {
|
||||
function downloadByUrl() {
|
||||
downloadManager.downloadUrl(url, filename);
|
||||
}
|
||||
|
@ -907,7 +907,7 @@ const PDFViewerApplication = {
|
|||
.catch(downloadByUrl); // Error occurred, try downloading with the URL.
|
||||
},
|
||||
|
||||
save({ sourceEventType = "download" }) {
|
||||
save({ sourceEventType = "download" } = {}) {
|
||||
if (this._saveInProgress) {
|
||||
return;
|
||||
}
|
||||
|
@ -988,7 +988,7 @@ const PDFViewerApplication = {
|
|||
if (!download) {
|
||||
return;
|
||||
}
|
||||
PDFViewerApplication.download();
|
||||
PDFViewerApplication.download({ sourceEventType: "download" });
|
||||
}
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue