Skip to content

Commit

Permalink
Filter out empty top menu-items (#4022)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenweldryn authored and emptynick committed Mar 23, 2019
1 parent c02f18d commit 99d9da6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private static function processItems($items)
return !$item->children->isEmpty() || app('VoyagerAuth')->user()->can('browse', $item);
})->filter(function ($item) {
// Filter out empty menu-items
if ($item->href == '' && $item->children->count() == 0) {
if ($item->url == '' && $item->route == '' && $item->children->count() == 0) {
return false;
}

Expand Down

0 comments on commit 99d9da6

Please sign in to comment.