Skip to content

Commit b5bbfdf

Browse files
committed
[fix] 修复菜单编辑引发null异常 #22
1 parent acaa955 commit b5bbfdf

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

Ape.Volo.Business/Permission/MenuService.cs

-24
Original file line numberDiff line numberDiff line change
@@ -351,30 +351,6 @@ public async Task<List<MenuDto>> FindSuperiorAsync(long id)
351351

352352
var tempDtos = App.Mapper.MapTo<List<MenuDto>>(menus);
353353
menuDtoList = TreeHelper<MenuDto>.ListToTrees(tempDtos, "Id", "ParentId", 0);
354-
foreach (var item in menuDtoList)
355-
{
356-
if (item.Children.Count == 0)
357-
{
358-
item.Children = null;
359-
}
360-
else
361-
{
362-
foreach (var item2 in item.Children)
363-
{
364-
if (item2.Children.Count == 0)
365-
{
366-
item2.Children = null;
367-
}
368-
else
369-
{
370-
foreach (var item3 in item2.Children.Where(item3 => item3.Children.Count == 0))
371-
{
372-
item3.Children = null;
373-
}
374-
}
375-
}
376-
}
377-
}
378354
}
379355

380356
return menuDtoList;

0 commit comments

Comments
 (0)