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:
Jonas Jenwald 2021-08-09 13:16:02 +02:00
parent 5ac139dea1
commit 474659be8b

View File

@ -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}".`);
});
}
},
/**