Browse Source

remove unnecessary parse

AykutSarac 3 years ago
parent
commit
91549de4e1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils/json-editor-parser.ts

+ 1 - 1
src/utils/json-editor-parser.ts

@@ -68,7 +68,7 @@ const relationships = (xs: { id: string; children: never[] }[]) => {
 
 export const parser = (input: string | string[]) => {
   try {
-    if (typeof input !== "object") input = JSON.parse(input);
+    // if (typeof input !== "object") input = JSON.parse(input);
     if (!Array.isArray(input)) input = [input];
 
     const mappedElements = extract(input);