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
@ -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…
x
Reference in New Issue
Block a user