mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Enable the ESLint prefer-const
rule in the web/
directory
Please find additional details about the ESLint rule at https://eslint.org/docs/rules/prefer-const Note that this patch is generated automatically, by using the ESLint `--fix` argument, and will thus require some additional clean-up (which is done separately).
This commit is contained in:
parent
9c767e3875
commit
5d14e68bec
36 changed files with 367 additions and 367 deletions
|
@ -30,7 +30,7 @@ const DISABLE_CREATE_OBJECT_URL =
|
|||
apiCompatibilityParams.disableCreateObjectURL || false;
|
||||
|
||||
function download(blobUrl, filename) {
|
||||
let a = document.createElement("a");
|
||||
const a = document.createElement("a");
|
||||
if (!a.click) {
|
||||
throw new Error('DownloadManager: "a.click()" is not supported.');
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class DownloadManager {
|
|||
navigator.msSaveBlob(new Blob([data], { type: contentType }), filename);
|
||||
return;
|
||||
}
|
||||
let blobUrl = createObjectURL(
|
||||
const blobUrl = createObjectURL(
|
||||
data,
|
||||
contentType,
|
||||
this.disableCreateObjectURL
|
||||
|
@ -89,7 +89,7 @@ class DownloadManager {
|
|||
return;
|
||||
}
|
||||
|
||||
let blobUrl = URL.createObjectURL(blob);
|
||||
const blobUrl = URL.createObjectURL(blob);
|
||||
download(blobUrl, filename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue