From 670d84da861961e9244439fb8b6ffa6f996f68ac Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Sun, 24 Oct 2021 14:13:03 +0200 Subject: [PATCH] Fix setPath: Don't override existing `$route`, if we already have one --- src/Canonical.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Canonical.php b/src/Canonical.php index 63f04ad54..ad618f2f0 100644 --- a/src/Canonical.php +++ b/src/Canonical.php @@ -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'); }