소스 검색

fix: the display format of json

ShengYan, Zhang 1 년 전
부모
커밋
6bbdaf7ab0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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");
 }