Skip to content

Commit

Permalink
fixed createUrl(), no parent name in URL if isRoot()
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Stebe committed Apr 16, 2016
1 parent b1412f7 commit 7e431b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public function createUrl($additionalParams = [])
'pageName' => ($this->name)
? Inflector::slug($this->name)
: '',
'parentLeave' => ($this->parents(1)->one())
'parentLeave' => ($this->parents(1)->one() && !$this->parents(1)->one()->isRoot())
? Inflector::slug($this->parents(1)->one()->name)
: null,
];
Expand Down

0 comments on commit 7e431b3

Please sign in to comment.