Skip to content

Commit

Permalink
Merge pull request #2876 from bolt/fix/boolean-logic-in-setpath
Browse files Browse the repository at this point in the history
Fix setPath: Don't override existing `$route`, if we already have one
  • Loading branch information
bobdenotter authored Oct 24, 2021
2 parents e336d17 + 670d84d commit 49feaa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Canonical.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function setPath(?string $route = null, array $params = []): void
{
if (! $route && ! $this->request->attributes->has('_route')) {
return;
} elseif ($this->request->attributes->has('_route')) {
} elseif (! $route) {
$route = $this->request->attributes->get('_route');
}

Expand Down

0 comments on commit 49feaa2

Please sign in to comment.