mirror of
https://git.mirrors.martin98.com/https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-08-05 15:00:40 +08:00
Merge pull request #1782 from yanCode/fix/json-format
fix: the display format of json error
This commit is contained in:
commit
6502855a70
@ -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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user