Ver Fonte

use parsedJson

AykutSarac há 3 anos atrás
pai
commit
ffa5b330fe
1 ficheiros alterados com 1 adições e 1 exclusões
  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);
         }