Ver Fonte

remove unnecessary parse

AykutSarac há 3 anos atrás
pai
commit
91549de4e1
1 ficheiros alterados com 1 adições e 1 exclusões
  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[]) => {
 export const parser = (input: string | string[]) => {
   try {
   try {
-    if (typeof input !== "object") input = JSON.parse(input);
+    // if (typeof input !== "object") input = JSON.parse(input);
     if (!Array.isArray(input)) input = [input];
     if (!Array.isArray(input)) input = [input];
 
 
     const mappedElements = extract(input);
     const mappedElements = extract(input);