diff --git a/src/Helper/NavItemHelper.php b/src/Helper/NavItemHelper.php index 76c9247..c00b971 100644 --- a/src/Helper/NavItemHelper.php +++ b/src/Helper/NavItemHelper.php @@ -21,7 +21,7 @@ public function __construct(array $item) $this->addClass('nav-link'); $this->itemClass[] = 'nav-item'; - if (! $this->item['subitems']) { + if (! ($this->item['subitems'] ?? null)) { return; } diff --git a/src/Resources/contao/templates/nav_navbar.html5 b/src/Resources/contao/templates/nav_navbar.html5 index ab0a4bd..080f659 100644 --- a/src/Resources/contao/templates/nav_navbar.html5 +++ b/src/Resources/contao/templates/nav_navbar.html5 @@ -10,7 +10,7 @@
<= $itemHelper->getTag(); ?> = $itemHelper ?>>= $item['link']?>= $item['link']?>= $itemHelper->getTag(); ?>> - = $item['subitems'] ?> + = $item['subitems'] ?? '' ?> isLevel(1)): ?>