mirror of
https://github.com/ChatGPTNextWeb/NextChat.git
synced 2026-03-01 16:39:15 +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