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