Skip to content

Commit

Permalink
Update presenter/locales/extractLocale.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Ulf Gebhardt <[email protected]>
  • Loading branch information
Elweyn and ulfgebhardt authored Mar 26, 2024
1 parent 4f88924 commit 0a101c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion presenter/locales/extractLocale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function extractLocale(url: string) {
let urlWithoutLocale
// We remove the URL locale, for example `/de/about` => `/about`
const firstPath = urlPaths[1] as LocaleCode
if (locales.filter((locale) => locale !== localeDefault).includes(firstPath)) {
if (locales.includes(firstPath)) {
locale = firstPath
urlWithoutLocale = '/' + urlPaths.slice(2).join('/')
} else {
Expand Down

0 comments on commit 0a101c7

Please sign in to comment.