fix(cli/body): Maximum call stack size exceeded error (#6537)

This commit is contained in:
Marcos Casagrande 2020-06-28 16:31:56 +02:00 committed by GitHub
parent 1c12098e4a
commit 89ebe2079b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 2 deletions

View file

@ -35,7 +35,7 @@ function validateBodyType(owner: Body, bodySource: BodyInit | null): boolean {
);
}
function concatenate(...arrays: Uint8Array[]): ArrayBuffer {
function concatenate(arrays: Uint8Array[]): ArrayBuffer {
let totalLength = 0;
for (const arr of arrays) {
totalLength += arr.length;
@ -73,7 +73,7 @@ async function bufferFromStream(
}
}
return concatenate(...parts);
return concatenate(parts);
}
export const BodyUsedError =