diff --git a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php index d46b05aad..01f360b0a 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -77,7 +77,11 @@ class SystemAttachmentCategoryServices extends BaseServices if ($menu['pid'] == $pid) { unset($menusList[$k]); $menu['children'] = $this->tidyMenuTier($menusList, $menu['id']); - if ($menu['children']) $menu['expand'] = true; + if (count($menu['children'])) { + $menu['expand'] = true; + } else { + unset($menu['children']); + } $navList[] = $menu; } }