Fix the inconsistent return types in PDFViewerApplication._parseHashParameters
While not really relevant to the previous patches, this fixes a small inconsistency in the code.
This commit is contained in:
parent
5ac139dea1
commit
474659be8b
12
web/app.js
12
web/app.js
@ -323,11 +323,11 @@ const PDFViewerApplication = {
|
||||
*/
|
||||
async _parseHashParameters() {
|
||||
if (!AppOptions.get("pdfBugEnabled")) {
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
const hash = document.location.hash.substring(1);
|
||||
if (!hash) {
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
const params = parseQueryString(hash),
|
||||
waitOn = [];
|
||||
@ -389,11 +389,13 @@ const PDFViewerApplication = {
|
||||
}
|
||||
|
||||
if (waitOn.length === 0) {
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
return Promise.all(waitOn).catch(reason => {
|
||||
try {
|
||||
await Promise.all(waitOn);
|
||||
} catch (reason) {
|
||||
console.error(`_parseHashParameters: "${reason.message}".`);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user