From d336ead3b12581f764ac1ac8abddeab747017bad Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Wed, 12 Oct 2022 02:57:09 -0400 Subject: [PATCH] Updated old comments of doMakeImage to better reflect the updated reading process. --- ui/media/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/media/main.js b/ui/media/main.js index 014882df..44c682c6 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -506,9 +506,8 @@ async function doMakeImage(task) { } try { // hack for a middleman buffering all the streaming updates, and unleashing them on the poor browser in one shot. - // this results in having to parse JSON like {"step": 1}{"step": 2}...{"status": "succeeded"..} - // which is obviously invalid. - // So we need to just extract the last {} section, starting from "status" to the end of the response + // this results in having to parse JSON like {"step": 1}{"step": 2}...{"status": "succeeded"..} which is obviously invalid. + // So we need to extract only the next {} section if (finalJSON.length > 0) { // Append new data when required if (jsonStr.length > 0) {