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);