mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Enable unicorn/prefer-at
unconditionally (PR 15014 follow-up)
Now that Node.js version 18 is required, we should be able to use `Array.prototype.at()` everywhere in the code-base.
This commit is contained in:
parent
f79f48c2b4
commit
dcd55a7164
6 changed files with 7 additions and 16 deletions
5
external/cmapscompress/optimize.js
vendored
5
external/cmapscompress/optimize.js
vendored
|
@ -151,10 +151,7 @@ exports.optimizeCMap = function (data) {
|
|||
const maxDistance = 100,
|
||||
minItems = 10,
|
||||
itemsPerBucket = 50;
|
||||
if (
|
||||
subitems.length > minItems &&
|
||||
codes[codes.length - 1] - codes[0] > maxDistance
|
||||
) {
|
||||
if (subitems.length > minItems && codes.at(-1) - codes[0] > maxDistance) {
|
||||
const gapsCount = Math.max(2, (subitems.length / itemsPerBucket) | 0);
|
||||
const gaps = [];
|
||||
for (let q = 0; q < gapsCount; q++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue