We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc48898 commit 2672042Copy full SHA for 2672042
lib/loader/index.js
@@ -199,7 +199,11 @@ function postInstantiate(baseModule, instance) {
199
200
/** Reads (copies) the values of an array from the module's memory. */
201
function __getArray(arr) {
202
- return Array.from(__getArrayView(arr));
+ const input = __getArrayView(arr);
203
+ const len = input.length;
204
+ const out = new Array(len);
205
+ for (let i = 0; i < len; i++) out[i] = input[i];
206
+ return out;
207
}
208
209
baseModule.__getArray = __getArray;
0 commit comments