diff --git a/src/assets/js/main.js b/src/assets/js/main.js index e2976be..46fe5cd 100644 --- a/src/assets/js/main.js +++ b/src/assets/js/main.js @@ -26,10 +26,10 @@ async function readResponse(response) { const decoder = new TextDecoder('utf-8'); try { + let finishedResponse = ''; + let JSONResponse = new Array(); + let cleanResponse = new Array(); function read() { - let finishedResponse = ''; - let JSONResponse = new Array(); - let cleanResponse = new Array(); // Recursive function to read the stream reader.read().then(( chunk ) => { console.log(`Done: ${JSON.stringify(chunk.done)}`);