Skip to content

Commit

Permalink
Stop at the [DONE] event correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmg-anon authored Mar 16, 2024
1 parent 82af78a commit 0659740
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mikupad.html
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,8 @@
}
// We only emit message-type events for now (and assume JSON)
if (data && (type || 'message') === 'message') {
if (data === '[DONE]')
break;
const json = JSON.parse(data);
// Both Chrome and Firefox suck at debugging
// text/event-stream, so make it easier by logging events
Expand Down

0 comments on commit 0659740

Please sign in to comment.