Skip to content

Commit

Permalink
PRESIDECMS-2977 do not do active checks on parent items
Browse files Browse the repository at this point in the history
they should always get from children.
  • Loading branch information
DominicWatson committed Dec 11, 2024
1 parent 8202442 commit 8775280
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/services/admin/AdminMenuItemService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}
};
Expand Down

0 comments on commit 8775280

Please sign in to comment.