mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(sse): prevent errors by returning early if response data is undefined
This commit is contained in:
parent
69643f4e5b
commit
a8c8a3d8ff
@ -53,6 +53,7 @@ export const startMsgSSEStreamWithRetry: () => () => void = () => {
|
||||
responseType: 'stream',
|
||||
adapter: 'fetch',
|
||||
});
|
||||
if (!res?.data) return;
|
||||
const stream = res.data;
|
||||
const reader = stream.pipeThrough(new TextDecoderStream()).getReader();
|
||||
retryTimes = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user