From a4c93c43b9ee955e632e068063a032d5dd4aff55 Mon Sep 17 00:00:00 2001 From: liujuping Date: Thu, 16 Feb 2023 14:24:36 +0800 Subject: [PATCH] fix: fix issues with build-components --- packages/utils/src/build-components.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/utils/src/build-components.ts b/packages/utils/src/build-components.ts index 9ed278996..af4c64699 100644 --- a/packages/utils/src/build-components.ts +++ b/packages/utils/src/build-components.ts @@ -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; }