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

Replace some Array.prototype-usage with spread syntax

We have a few, quite old, call-sites that use the `Array.prototype`-format and which can now be replaced with spread syntax instead.
This commit is contained in:
Jonas Jenwald 2022-09-23 09:35:30 +02:00
parent 91bdcd8b20
commit 6538409282
3 changed files with 6 additions and 17 deletions

View file

@ -419,7 +419,7 @@ describe("function", function () {
for (const { input, output } of samples) {
const out = new Float32Array(output.length);
fn(input, 0, out, 0);
expect(Array.prototype.slice.call(out, 0)).toEqual(output);
expect(Array.from(out)).toEqual(output);
}
}
}