mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 06:57:33 +08:00
fix: the display format of json
This commit is contained in:
@@ -6,5 +6,8 @@ export function prettyObject(msg: any) {
|
||||
if (msg === "{}") {
|
||||
return obj.toString();
|
||||
}
|
||||
if (msg.startsWith("```json")) {
|
||||
return msg;
|
||||
}
|
||||
return ["```json", msg, "```"].join("\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user