Skip to content

Commit

Permalink
marking node as active using wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
begimov committed Jul 8, 2019
1 parent e9e741d commit 5437d30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Models/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ private function markAsActive()

private function getPath()
{
return trim(parse_url($this->link(), PHP_URL_PATH), '/') ?:
($this->link() ? '/' : null);
$path = trim(parse_url($this->link(), PHP_URL_PATH), '/');

return $path ? $path . '*' : ($this->link() ? '/' : null);
}

private function find($item, $key, $value)
Expand Down

0 comments on commit 5437d30

Please sign in to comment.