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() {
|
function downloadByUrl() {
|
||||||
downloadManager.downloadUrl(url, filename);
|
downloadManager.downloadUrl(url, filename);
|
||||||
}
|
}
|
||||||
@ -907,7 +907,7 @@ const PDFViewerApplication = {
|
|||||||
.catch(downloadByUrl); // Error occurred, try downloading with the URL.
|
.catch(downloadByUrl); // Error occurred, try downloading with the URL.
|
||||||
},
|
},
|
||||||
|
|
||||||
save({ sourceEventType = "download" }) {
|
save({ sourceEventType = "download" } = {}) {
|
||||||
if (this._saveInProgress) {
|
if (this._saveInProgress) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -988,7 +988,7 @@ const PDFViewerApplication = {
|
|||||||
if (!download) {
|
if (!download) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PDFViewerApplication.download();
|
PDFViewerApplication.download({ sourceEventType: "download" });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user