Skip to content

Commit

Permalink
Refactor method to make it more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 22, 2024
1 parent db4a454 commit 5b201eb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ public function getItemsInGroup(?string $group): Collection

public function isGroupActive(string $group): bool
{
return Hyde::makeSlug(Render::getPage()->navigationMenuGroup()) === $group
|| $this->isPageIndexPage() && $this->shouldIndexPageBeActive($group);
$normalized = Hyde::makeSlug(Render::getPage()->navigationMenuGroup());

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

public function makeGroupTitle(string $group): string
Expand Down

0 comments on commit 5b201eb

Please sign in to comment.