mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +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
|
@ -249,7 +249,7 @@ function incrementalUpdate({
|
|||
const refForXrefTable = xrefInfo.newRef;
|
||||
|
||||
let buffer, baseOffset;
|
||||
const lastByte = originalData[originalData.length - 1];
|
||||
const lastByte = originalData.at(-1);
|
||||
if (lastByte === /* \n */ 0x0a || lastByte === /* \r */ 0x0d) {
|
||||
buffer = [];
|
||||
baseOffset = originalData.length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue