diff --git a/src/assets/js/main.js b/src/assets/js/main.js index b4a9900..53a6685 100644 --- a/src/assets/js/main.js +++ b/src/assets/js/main.js @@ -28,9 +28,9 @@ async function readResponse(response) { try { function read() { // Recursive function to read the stream - reader.read().then(( done, value ) => { - console.log(`Done: ${JSON.stringify(done)}`); - console.log(`Value: ${new TextDecoder().decode(value)}`); + reader.read().then(( chunk ) => { + console.log(`Done: ${JSON.stringify(chunk.done)}`); + console.log(`Value: ${new TextDecoder().decode(chunk.value)}`); if (done) { return; }