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);
|
||||
},
|
||||
onOpenWithURL: (url, length, originalUrl) => {
|
||||
let file = url,
|
||||
args = null;
|
||||
if (length !== undefined) {
|
||||
args = { length };
|
||||
}
|
||||
if (originalUrl !== undefined) {
|
||||
file = { url, originalUrl };
|
||||
}
|
||||
const file = originalUrl !== undefined ? { url, originalUrl } : url;
|
||||
const args = length !== undefined ? { length } : null;
|
||||
|
||||
this.open(file, args);
|
||||
},
|
||||
onError: err => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user