Skip to content

Commit

Permalink
fix: fix issues with build-components
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping authored and JackLian committed Feb 16, 2023
1 parent 762189c commit a4c93c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/utils/src/build-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function getSubComponent(library: any, paths: string[]) {
const key = paths[i]!;
let ex: any;
try {
component = library[key];
component = library[key] || component;
} catch (e) {
ex = e;
component = null;
Expand All @@ -51,9 +51,6 @@ export function getSubComponent(library: any, paths: string[]) {
}
library = component;
i++;
if (isReactComponent(component)) {
break;
}
}
return component;
}
Expand Down

0 comments on commit a4c93c4

Please sign in to comment.