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
@ -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…
x
Reference in New Issue
Block a user