Slightly simplify the parameter handling in initPassiveLoading.onOpenWithURL
This commit is contained in:
parent
b375a867eb
commit
25b581c2a9
11
web/app.js
11
web/app.js
@ -709,14 +709,9 @@ const PDFViewerApplication = {
|
|||||||
this.open(data);
|
this.open(data);
|
||||||
},
|
},
|
||||||
onOpenWithURL: (url, length, originalUrl) => {
|
onOpenWithURL: (url, length, originalUrl) => {
|
||||||
let file = url,
|
const file = originalUrl !== undefined ? { url, originalUrl } : url;
|
||||||
args = null;
|
const args = length !== undefined ? { length } : null;
|
||||||
if (length !== undefined) {
|
|
||||||
args = { length };
|
|
||||||
}
|
|
||||||
if (originalUrl !== undefined) {
|
|
||||||
file = { url, originalUrl };
|
|
||||||
}
|
|
||||||
this.open(file, args);
|
this.open(file, args);
|
||||||
},
|
},
|
||||||
onError: err => {
|
onError: err => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user