瀏覽代碼

use parsedJson

AykutSarac 3 年之前
父節點
當前提交
ffa5b330fe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/containers/JsonEditor/index.tsx

+ 1 - 1
src/containers/JsonEditor/index.tsx

@@ -61,7 +61,7 @@ const JsonEditor: React.FC = () => {
         const parsedJson = parseJson(value);
 
         if (settings.autoformat) {
-          setValue(JSON.stringify(JSON.parse(value), null, 2));
+          setValue(JSON.stringify(parsedJson, null, 2));
         } else {
           setValue(value);
         }