Skip to content

Commit

Permalink
fix(projects): Fix secondary directory components is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
paynezhuang committed Jun 13, 2024
1 parent 7026126 commit adf8c20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/views/manage/menu/modules/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit adf8c20

Please sign in to comment.