From 87752806557a823bcea60224e4d8bc8030bac2cc Mon Sep 17 00:00:00 2001 From: Dominic Watson Date: Tue, 3 Dec 2024 07:20:42 +0000 Subject: [PATCH] PRESIDECMS-2977 do not do active checks on parent items they should always get from children. --- system/services/admin/AdminMenuItemService.cfc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/services/admin/AdminMenuItemService.cfc b/system/services/admin/AdminMenuItemService.cfc index 2122dcff6..86d48a091 100644 --- a/system/services/admin/AdminMenuItemService.cfc +++ b/system/services/admin/AdminMenuItemService.cfc @@ -59,10 +59,11 @@ component { var flatItems = []; var expandItems = function( children ){ for( var childId in children ) { - ArrayAppend( flatItems, childId ); var childItem = settings[ childId ] ?: {}; if ( StructKeyExists( childItem, "subMenuItems" ) && IsArray( childItem.subMenuItems ) && ArrayLen( childItem.subMenuItems ) ) { expandItems( childItem.subMenuItems ); + } else { + ArrayAppend( flatItems, childId ); } } };