Explorar o código

fix: the display format of json

ShengYan, Zhang hai 1 ano
pai
achega
6bbdaf7ab0
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      app/utils/format.ts

+ 3 - 0
app/utils/format.ts

@@ -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");
 }