mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Simplify the CFFCompiler.compileTypedArray
method
Rather than manually creating the Array, we can use the now existing `Array.from` method instead.
This commit is contained in:
parent
0ce568e789
commit
c79bdd6ae6
1 changed files with 1 additions and 5 deletions
|
@ -1845,11 +1845,7 @@ class CFFCompiler {
|
|||
}
|
||||
|
||||
compileTypedArray(data) {
|
||||
const out = [];
|
||||
for (let i = 0, ii = data.length; i < ii; ++i) {
|
||||
out[i] = data[i];
|
||||
}
|
||||
return out;
|
||||
return Array.from(data);
|
||||
}
|
||||
|
||||
compileIndex(index, trackers = []) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue