Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
hide parent menu without url
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Sep 6, 2019
1 parent 8666436 commit 06b38db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function all()
$sidebar = $this->get('sidebar');

$items = $sidebar->all()->map(function (Item $item) {
$item->data('is-parent', $item->hasChildren());
$item->data('is-parent', $item->hasChildren() || (!$item->hasChildren() && !$item->link->path['url']));

return $item;
});
Expand Down

0 comments on commit 06b38db

Please sign in to comment.