mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
[ci] format
This commit is contained in:
parent
b5e3403fa1
commit
f3e01f6c26
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ function createResponseClass() {
|
||||||
let decoder = new TextDecoder();
|
let decoder = new TextDecoder();
|
||||||
let body = this.#body as AsyncIterable<Uint8Array>;
|
let body = this.#body as AsyncIterable<Uint8Array>;
|
||||||
let out = '';
|
let out = '';
|
||||||
for await(let chunk of body) {
|
for await (let chunk of body) {
|
||||||
out += decoder.decode(chunk);
|
out += decoder.decode(chunk);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
|
@ -35,7 +35,7 @@ function createResponseClass() {
|
||||||
if (this.#isStream && isNodeJS) {
|
if (this.#isStream && isNodeJS) {
|
||||||
let body = this.#body as AsyncIterable<Uint8Array>;
|
let body = this.#body as AsyncIterable<Uint8Array>;
|
||||||
let chunks: number[] = [];
|
let chunks: number[] = [];
|
||||||
for await(let chunk of body) {
|
for await (let chunk of body) {
|
||||||
chunks.push(...chunk);
|
chunks.push(...chunk);
|
||||||
}
|
}
|
||||||
return Uint8Array.from(chunks);
|
return Uint8Array.from(chunks);
|
||||||
|
|
Loading…
Reference in a new issue