Browse Source

fix: 提交不检查test

guoxiaoxiao8 4 years ago
parent
commit
67cee1bdab
2 changed files with 1 additions and 2 deletions
  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
 node ./jd/verifymail.js
 yarn lint-staged
 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.name = componentName;
       _component.install = (vue: App) => {
       _component.install = (vue: App) => {
         vue.component(_component.name as string, _component);
         vue.component(_component.name as string, _component);
-        _component.children.length &&
+        _component?.children?.length &&
           _component.children.forEach((item: any) => {
           _component.children.forEach((item: any) => {
             vue.component(item.name as string, item);
             vue.component(item.name as string, item);
           });
           });