头部导航栏里的菜单无法正常渲染出来的bug (#2046)

菜单循环中没有子菜单就直接返回,没有添加到arr列表中导致arr始终是空的
This commit is contained in:
zayn
2025-06-20 13:36:43 +08:00
committed by GitHub
parent f7c3d76d37
commit e58d40ab83

View File

@@ -55,7 +55,6 @@
const deepMenus = (menus) => {
const arr = []
menus?.forEach((menu) => {
if (!menu?.children) return
if (menu.children && menu.children.length > 0) {
arr.push(...deepMenus(menu.children))
} else {