Skip to content

Commit

Permalink
Add comparison fallback instead of null value
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 22, 2024
1 parent 5b201eb commit 48213a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getItemsInGroup(?string $group): Collection

public function isGroupActive(string $group): bool
{
$normalized = Hyde::makeSlug(Render::getPage()->navigationMenuGroup());
$normalized = Hyde::makeSlug(Render::getPage()->navigationMenuGroup() ?? 'other');

return ($normalized === $group) || ($this->isPageIndexPage() && $this->shouldIndexPageBeActive($group));
}
Expand Down

0 comments on commit 48213a3

Please sign in to comment.