Skip to content

Commit

Permalink
fix: Fix rare occasions where streaming continues infinitely
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed May 18, 2024
1 parent a1057e8 commit a8ba8a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ChatBotContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const ChatBotContainer = ({ flow }: { flow: Flow }) => {
});

// when streaming is done, remove task, unlock text area, and resolve the promise
if (streamIndex === endStreamIndex) {
if (streamIndex >= endStreamIndex) {
clearInterval(intervalId);
resolve();
}
Expand Down

0 comments on commit a8ba8a3

Please sign in to comment.