1
0
Fork 0
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:
Jonas Jenwald 2023-04-25 17:19:59 +02:00
parent f79f48c2b4
commit dcd55a7164
6 changed files with 7 additions and 16 deletions

View file

@ -72,7 +72,7 @@ function preprocess(inFilename, outFilename, defines) {
? outFilename
: function (line) {
if (!line || AllWhitespaceRegexp.test(line)) {
const prevLine = out[out.length - 1];
const prevLine = out.at(-1);
if (!prevLine || AllWhitespaceRegexp.test(prevLine)) {
return; // Avoid adding consecutive blank lines.
}