From 0a101c72a3ec6eaf198cb79ef716cc7a1a361c40 Mon Sep 17 00:00:00 2001 From: Hannes Heine Date: Tue, 26 Mar 2024 10:47:47 +0100 Subject: [PATCH] Update presenter/locales/extractLocale.ts Co-authored-by: Ulf Gebhardt --- presenter/locales/extractLocale.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presenter/locales/extractLocale.ts b/presenter/locales/extractLocale.ts index dcd5e2c963..6c21d96dcb 100644 --- a/presenter/locales/extractLocale.ts +++ b/presenter/locales/extractLocale.ts @@ -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 {