diff --git a/client/src/api/fetch.ts b/client/src/api/fetch.ts index 2564d76ef..d0dd4811e 100644 --- a/client/src/api/fetch.ts +++ b/client/src/api/fetch.ts @@ -89,6 +89,8 @@ export const streamFetch = ({ }); read(); } catch (err: any) { + console.log(111111111111111111); + if (err?.message === 'The user aborted a request.') { return resolve({ responseText, @@ -102,7 +104,7 @@ export const streamFetch = ({ }; read(); } catch (err: any) { - console.log(err); + console.log(err, 'fetch error'); reject(getErrText(err, '请求异常')); } diff --git a/client/src/components/ChatBox/index.tsx b/client/src/components/ChatBox/index.tsx index 014379227..bf54bf36b 100644 --- a/client/src/components/ChatBox/index.tsx +++ b/client/src/components/ChatBox/index.tsx @@ -464,7 +464,7 @@ const ChatBox = ( source={item.value} isChatting={index === chatHistory.length - 1 && isChatting} /> - {(item[quoteLenKey] || item[rawSearchKey]?.length) && ( + {(!!item[quoteLenKey] || !!item[rawSearchKey]?.length) && (