mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Remove variable shadowing from the JavaScript files in the src/display/
folder
*This is part of a series of patches that will try to split PR 11566 into smaller chunks, to make reviewing more feasible.* Once all the code has been fixed, we'll be able to eventually enable the ESLint no-shadow rule; see https://eslint.org/docs/rules/no-shadow
This commit is contained in:
parent
3cebb430c2
commit
3539a17d2a
6 changed files with 44 additions and 44 deletions
|
@ -2343,7 +2343,7 @@ class WorkerTransport {
|
|||
this._onUnsupportedFeature.bind(this)
|
||||
);
|
||||
|
||||
messageHandler.on("JpegDecode", data => {
|
||||
messageHandler.on("JpegDecode", ([imageUrl, components]) => {
|
||||
if (this.destroyed) {
|
||||
return Promise.reject(new Error("Worker was destroyed"));
|
||||
}
|
||||
|
@ -2354,7 +2354,6 @@ class WorkerTransport {
|
|||
return Promise.reject(new Error('"document" is not defined.'));
|
||||
}
|
||||
|
||||
const [imageUrl, components] = data;
|
||||
if (components !== 3 && components !== 1) {
|
||||
return Promise.reject(
|
||||
new Error("Only 3 components or 1 component can be returned")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue