mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-27 21:56:42 +08:00
fix(projects): Fix secondary directory components is empty
This commit is contained in:
parent
7026126a57
commit
adf8c20a3c
@ -15,11 +15,11 @@ export function getLayoutAndPage(component?: string | null) {
|
||||
}
|
||||
|
||||
function getLayout(layout: string) {
|
||||
return layout.startsWith(LAYOUT_PREFIX) ? layout.replace(LAYOUT_PREFIX, '') : '';
|
||||
return layout?.startsWith(LAYOUT_PREFIX) ? layout.replace(LAYOUT_PREFIX, '') : '';
|
||||
}
|
||||
|
||||
function getPage(page: string) {
|
||||
return page.startsWith(VIEW_PREFIX) ? page.replace(VIEW_PREFIX, '') : '';
|
||||
return page?.startsWith(VIEW_PREFIX) ? page.replace(VIEW_PREFIX, '') : '';
|
||||
}
|
||||
|
||||
export function transformLayoutAndPageToComponent(layout: string, page: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user