Skip to content

Commit

Permalink
fix(projects): the length of routes children list should greater than 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowsight9 committed Feb 19, 2023
1 parent 960b436 commit e1afc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/router/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function transformAuthRouteToMenu(routes: AuthRoute.Route[]): App.GlobalM
const { name, path, meta } = route;
const routeName = name as string;
let menuChildren: App.GlobalMenuOption[] | undefined;
if (route.children) {
if (route.children && route.children.length > 0) {
menuChildren = transformAuthRouteToMenu(route.children);
}
const menuItem: App.GlobalMenuOption = addPartialProps({
Expand Down

0 comments on commit e1afc10

Please sign in to comment.