mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-24 04:59:19 +08:00
hotfix plugin result is not string #5614
This commit is contained in:
@@ -223,6 +223,11 @@ export function stream(
|
|||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let content = res.data || res?.statusText;
|
let content = res.data || res?.statusText;
|
||||||
|
// hotfix #5614
|
||||||
|
content =
|
||||||
|
typeof content === "string"
|
||||||
|
? content
|
||||||
|
: JSON.stringify(content);
|
||||||
if (res.status >= 300) {
|
if (res.status >= 300) {
|
||||||
return Promise.reject(content);
|
return Promise.reject(content);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user