Skip to content

Commit

Permalink
fixing bug where streaming html with just a text string would throw e…
Browse files Browse the repository at this point in the history
…rrors
  • Loading branch information
OvidijusParsiunas committed Nov 5, 2024
1 parent 2a40e29 commit 1e0e917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion component/src/utils/HTTP/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ export class Stream {
}
if (result.html) {
sh.onOpen();
const responseHTMLStrings = HTMLUtils.splitHTML(result.html);
let responseHTMLStrings = HTMLUtils.splitHTML(result.html);
if (responseHTMLStrings.length === 0) responseHTMLStrings = result.html.split('');
Stream.populateMessages(responseHTMLStrings, new MessageStream(messages), simulationSH, 'html');
}
}
Expand Down

0 comments on commit 1e0e917

Please sign in to comment.