Skip to content

Commit c691ac4

Browse files
committed
Fix default fallback locale
1 parent 0cb7b99 commit c691ac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/UrlGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function route($name, $parameters = [], $absolute = true, $locale = null)
5757
// Check if the locale is supported
5858
if ( ! in_array($locale, $this->getSupportedLocales())) {
5959
// Use a fallback locale if provided
60-
$locale = Config::get('localized-routes.fallback_locale', $locale);
60+
$locale = Config::get('localized-routes.fallback_locale') ?: $locale;
6161
}
6262

6363
// Normalize the route name by removing any locale prefix.

0 commit comments

Comments
 (0)