diff --git a/src/layout/components/sidebar/SideMenu.vue b/src/layout/components/sidebar/SideMenu.vue index 6989199..bb18508 100644 --- a/src/layout/components/sidebar/SideMenu.vue +++ b/src/layout/components/sidebar/SideMenu.vue @@ -68,7 +68,7 @@ function getMenuItem(route, basePath = '') { if (visibleItems.length === 1) { menuItem = getMenuItem(visibleItems[0], menuItem.path) - } else { + } else if (visibleItems.length > 1) { menuItem.children = visibleItems.map((item) => getMenuItem(item, menuItem.path)) } } else {