mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Enable the unicorn/prefer-at
ESLint plugin rule (PR 15008 follow-up)
Please find additional information here: - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
This commit is contained in:
parent
5d88233fbb
commit
9ac4536693
32 changed files with 56 additions and 46 deletions
|
@ -206,7 +206,7 @@ class RadialAxialShading extends BaseShading {
|
|||
}
|
||||
if (!extendEnd) {
|
||||
// Same idea as above in extendStart but for the end.
|
||||
colorStops[colorStops.length - 1][0] -= BaseShading.SMALL_NUMBER;
|
||||
colorStops.at(-1)[0] -= BaseShading.SMALL_NUMBER;
|
||||
colorStops.push([1, background]);
|
||||
}
|
||||
|
||||
|
@ -501,11 +501,11 @@ class MeshShading extends BaseShading {
|
|||
verticesLeft = 3;
|
||||
break;
|
||||
case 1:
|
||||
ps.push(ps[ps.length - 2], ps[ps.length - 1]);
|
||||
ps.push(ps.at(-2), ps.at(-1));
|
||||
verticesLeft = 1;
|
||||
break;
|
||||
case 2:
|
||||
ps.push(ps[ps.length - 3], ps[ps.length - 1]);
|
||||
ps.push(ps.at(-3), ps.at(-1));
|
||||
verticesLeft = 1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue