Merge pull request #182 from Shadowsight9/main

fix(projects): the length of routes children list should greater than 0
This commit is contained in:
Soybean 2023-02-19 19:33:53 +08:00 committed by GitHub
commit 506ffb8adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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({