Explorar el Código

use parsedJson

AykutSarac hace 3 años
padre
commit
ffa5b330fe
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);
         }