tangning 20 시간 전
부모
커밋
6aa5ac150c
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      src/api/tagging-style.ts

+ 7 - 2
src/api/tagging-style.ts

@@ -122,10 +122,15 @@ export const fetchTaggingStyles = async () => {
       }
     }
   };
-  const tree: any = { children: [] };
+  let tree: any = { children: [] };
+  console.log('tree', tree)
   genTree(treeData, tree);
   styleTypes.length = 0
-  styleTypes.push(...tree.children)
+  console.log('tree', tree)
+  if(!tree.children){
+    tree = { children: [] }
+  }
+  tree.children && styleTypes.push(...tree.children)
   Object.assign(defStyleType, tree.children[tree.children.length - 1])
   
   console.error('StyleT', styleTypes)