Skip to content

Commit

Permalink
Fix chat request cancel on focus change (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored Sep 14, 2023
1 parent c10a0ff commit 74d7d4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const request = async (
return new Promise<void>(async (resolve, reject) => {
const streamOptions: FetchEventSourceInit = {
...requestOptions,
openWhenHidden: true,
onmessage: (e: EventSourceMessage) => {
if (onMessage) onMessage(e);
},
Expand Down

1 comment on commit 74d7d4e

@vercel
Copy link

@vercel vercel bot commented on 74d7d4e Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.