From aabb2a49c45ede1ded32987f989f10766848566b Mon Sep 17 00:00:00 2001 From: paynezhuang Date: Thu, 13 Jun 2024 23:00:18 +0800 Subject: [PATCH] fix(projects): Fix secondary directory components is empty (#491) --- src/views/manage/menu/modules/shared.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/manage/menu/modules/shared.ts b/src/views/manage/menu/modules/shared.ts index 2549b403d..a8da69384 100644 --- a/src/views/manage/menu/modules/shared.ts +++ b/src/views/manage/menu/modules/shared.ts @@ -6,7 +6,7 @@ export function getLayoutAndPage(component?: string | null) { let layout = ''; let page = ''; - const [layoutOrPage, pageItem] = component?.split(FIRST_LEVEL_ROUTE_COMPONENT_SPLIT) || []; + const [layoutOrPage = '', pageItem = ''] = component?.split(FIRST_LEVEL_ROUTE_COMPONENT_SPLIT) || []; layout = getLayout(layoutOrPage); page = getPage(pageItem || layoutOrPage);