Skip to content

Commit

Permalink
Use group identifier for internal generator state
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Feb 20, 2024
1 parent 9e5dc91 commit 5a0c19e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ protected function generate(): void
$group = 'Other';
}

$groupItem = $this->items->get($group);
$groupItem = $this->items->get(Str::slug($group));

if ($groupItem === null) {
$groupItem = NavItem::dropdown($this->makeTitleForGroup($group), []);
}

$groupItem->addChild($item);

if (! $this->items->has($group)) {
$this->items->put($group, $groupItem);
if (! $this->items->has($groupItem->getIdentifier())) {
$this->items->put($groupItem->getIdentifier(), $groupItem);
}

return;
Expand Down

0 comments on commit 5a0c19e

Please sign in to comment.