From 14f928d49a2fb47fada574c568021ecf3a6d1c0d Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sat, 26 Aug 2023 18:10:58 +0100 Subject: 404 works when no valid locale supplied in URL --- src/pages/404.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pages') diff --git a/src/pages/404.astro b/src/pages/404.astro index 447a91e..bc91220 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -1,7 +1,7 @@ --- -import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath'; +import { getLocaleFromPathOrDefault } from '$lib/getLocaleFromPath'; -const locale = getLocaleFromPathOrThrow(Astro.url.pathname); +const locale = getLocaleFromPathOrDefault(Astro.url.pathname); --- -- cgit v1.2.3