mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 17:25:52 +08:00
fix: #1612 infinite loading
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
export function prettyObject(msg: any) {
|
||||
const prettyMsg = [
|
||||
"```json\n",
|
||||
JSON.stringify(msg, null, " "),
|
||||
"\n```",
|
||||
].join("");
|
||||
if (typeof msg !== "string") {
|
||||
msg = JSON.stringify(msg, null, " ");
|
||||
}
|
||||
const prettyMsg = ["```json", msg, "```"].join("\n");
|
||||
return prettyMsg;
|
||||
}
|
||||
|
Reference in New Issue
Block a user