Skip to content

Commit

Permalink
Merge pull request #182 from Shadowsight9/main
Browse files Browse the repository at this point in the history
fix(projects): the length of routes children list should greater than 0
  • Loading branch information
honghuangdc committed Feb 19, 2023
2 parents 960b436 + e1afc10 commit 506ffb8
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

1 comment on commit 506ffb8

@vercel
Copy link

@vercel vercel bot commented on 506ffb8 Feb 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.