fix: fix issues with build-components

This commit is contained in:
liujuping 2023-02-16 14:24:36 +08:00 committed by 林熠
parent 762189cc56
commit a4c93c43b9

View File

@ -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;
@ -51,9 +51,6 @@ export function getSubComponent(library: any, paths: string[]) {
}
library = component;
i++;
if (isReactComponent(component)) {
break;
}
}
return component;
}