summaryrefslogtreecommitdiff
path: root/src/components/NewsIndex/NewsIndex.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/NewsIndex/NewsIndex.astro')
-rw-r--r--src/components/NewsIndex/NewsIndex.astro4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/NewsIndex/NewsIndex.astro b/src/components/NewsIndex/NewsIndex.astro
index 6738071..ae4c226 100644
--- a/src/components/NewsIndex/NewsIndex.astro
+++ b/src/components/NewsIndex/NewsIndex.astro
@@ -1,7 +1,7 @@
---
import type { CollectionEntry } from 'astro:content';
import NewsPreviewLink from './NewsPreviewLink.astro';
-import getLocaleFromPath from '$lib/getLocaleFromPath';
+import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath';
import translate from '$i18n/translate';
import tComponent from '$i18n/translations/components/newsIndex';
interface Props {
@@ -10,7 +10,7 @@ interface Props {
}
const { headingLevel, newsItems } = Astro.props;
-const locale = getLocaleFromPath(Astro.url.pathname);
+const locale = getLocaleFromPathOrThrow(Astro.url.pathname);
const t = translate(locale);
---