Fix done detection
This commit is contained in:
parent
36c215b6f3
commit
57f3197a39
@ -31,7 +31,7 @@ async function readResponse(response) {
|
||||
reader.read().then(( chunk ) => {
|
||||
console.log(`Done: ${JSON.stringify(chunk.done)}`);
|
||||
console.log(`Value: ${new TextDecoder().decode(chunk.value)}`);
|
||||
if (done) {
|
||||
if (chunk.done) {
|
||||
return;
|
||||
}
|
||||
read();
|
||||
|
Loading…
Reference in New Issue
Block a user