Explorar el Código

fix object key visible

AykutSarac hace 3 años
padre
commit
05881ab4fc
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/utils/json-editor-parser.js

+ 3 - 1
src/utils/json-editor-parser.js

@@ -22,7 +22,9 @@ export const parser = (input) => {
         id: nextId(),
         data: {
           label: Object.fromEntries(
-            Object.entries(o).filter(([k, v]) => !Array.isArray(v))
+            Object.entries(o).filter(
+              ([k, v]) => !Array.isArray(v) && !(v instanceof Object)
+            )
           ),
         },
         position: { x: 0, y: 0 },