1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #15023 from Snuffleupagus/prefer-array-flat

Enable the `unicorn/prefer-array-flat` and `unicorn/prefer-array-flat-map` ESLint plugin rules
This commit is contained in:
Tim van der Meij 2022-06-12 20:10:52 +02:00 committed by GitHub
commit 26ae50e449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -254,7 +254,7 @@ function searchNode(
if (isFinite(index)) {
root = nodes.filter(node => index < node.length).map(node => node[index]);
} else {
root = nodes.reduce((acc, node) => acc.concat(node), []);
root = nodes.flat();
}
}