diff --git a/src/Components/NavMenu.php b/src/Components/NavMenu.php index e384ccc3..b961adbb 100644 --- a/src/Components/NavMenu.php +++ b/src/Components/NavMenu.php @@ -114,8 +114,9 @@ protected function buildMenuItemsForDropdownMenu( $menuDescription, $indent = 0 $this->indent( $indent ); foreach ( $menuDescription['content'] as $key => $item ) { + $id = $item['id'] ?? ''; $menuitems .= $this->indent() . $this->getSkinTemplate()->makeListItem( $key, $item, - [ 'tag' => 'div', 'class' => 'nav-item', 'link-class' => 'nav-link '.$item['id'] ] ); + [ 'tag' => 'div', 'class' => 'nav-item', 'link-class' => 'nav-link '. $id ] ); } $this->indent( - $indent );