mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Remove variable shadowing from the JavaScript files in the web/
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
a23ce6b483
commit
886b256ada
6 changed files with 25 additions and 30 deletions
|
@ -277,7 +277,7 @@ class PDFFindController {
|
|||
* the `matches` and keeps elements with a longer match length.
|
||||
*/
|
||||
_prepareMatches(matchesWithLength, matches, matchesLength) {
|
||||
function isSubTerm(matchesWithLength, currentIndex) {
|
||||
function isSubTerm(currentIndex) {
|
||||
const currentElem = matchesWithLength[currentIndex];
|
||||
const nextElem = matchesWithLength[currentIndex + 1];
|
||||
|
||||
|
@ -318,7 +318,7 @@ class PDFFindController {
|
|||
: a.match - b.match;
|
||||
});
|
||||
for (let i = 0, len = matchesWithLength.length; i < len; i++) {
|
||||
if (isSubTerm(matchesWithLength, i)) {
|
||||
if (isSubTerm(i)) {
|
||||
continue;
|
||||
}
|
||||
matches.push(matchesWithLength[i].match);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue