mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +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) {
|
compileTypedArray(data) {
|
||||||
const out = [];
|
return Array.from(data);
|
||||||
for (let i = 0, ii = data.length; i < ii; ++i) {
|
|
||||||
out[i] = data[i];
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compileIndex(index, trackers = []) {
|
compileIndex(index, trackers = []) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue