Skip to content

Commit 9789cd9

Browse files
committed
Return original slug from UrlDetector if supported locales is empty
1 parent 6749f5a commit 9789cd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Detectors/UrlDetector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function detect()
2020

2121
// If supported locales is a simple array like ['en', 'nl']
2222
// just return the slug and let Localizer check if it is supported.
23-
if (array_key_exists(0, $locales)) {
23+
if (count($locales) === 0 || is_numeric(key($locales))) {
2424
return $slug;
2525
}
2626

0 commit comments

Comments
 (0)