Skip to content

Commit a4c93c4

Browse files
liujupingJackLian
authored andcommitted
fix: fix issues with build-components
1 parent 762189c commit a4c93c4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/utils/src/build-components.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function getSubComponent(library: any, paths: string[]) {
3636
const key = paths[i]!;
3737
let ex: any;
3838
try {
39-
component = library[key];
39+
component = library[key] || component;
4040
} catch (e) {
4141
ex = e;
4242
component = null;
@@ -51,9 +51,6 @@ export function getSubComponent(library: any, paths: string[]) {
5151
}
5252
library = component;
5353
i++;
54-
if (isReactComponent(component)) {
55-
break;
56-
}
5754
}
5855
return component;
5956
}

0 commit comments

Comments
 (0)