fix(projects): Fix secondary directory components is empty (#491)
This commit is contained in:
parent
7026126a57
commit
aabb2a49c4
@ -6,7 +6,7 @@ export function getLayoutAndPage(component?: string | null) {
|
|||||||
let layout = '';
|
let layout = '';
|
||||||
let page = '';
|
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);
|
layout = getLayout(layoutOrPage);
|
||||||
page = getPage(pageItem || layoutOrPage);
|
page = getPage(pageItem || layoutOrPage);
|
||||||
|
Loading…
Reference in New Issue
Block a user