浏览代码

fix: 提交不检查test

guoxiaoxiao8 4 年之前
父节点
当前提交
67cee1bdab
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 0 1
      .husky/pre-commit
  2. 1 1
      src/packages/utils/create/component.ts

+ 0 - 1
.husky/pre-commit

@@ -3,4 +3,3 @@
 
 node ./jd/verifymail.js
 yarn lint-staged
-yarn test

+ 1 - 1
src/packages/utils/create/component.ts

@@ -8,7 +8,7 @@ export function createComponent(name: string) {
       _component.name = componentName;
       _component.install = (vue: App) => {
         vue.component(_component.name as string, _component);
-        _component.children.length &&
+        _component?.children?.length &&
           _component.children.forEach((item: any) => {
             vue.component(item.name as string, item);
           });