summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-26 18:10:58 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-26 18:10:58 +0100
commit14f928d49a2fb47fada574c568021ecf3a6d1c0d (patch)
tree50ddf17d3ad4706b4b58e28d937e957f71c23452 /src/pages
parentf2243efa6cb6ca65fbc0f91ac6aadf5f92e38422 (diff)
404 works when no valid locale supplied in URL
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/404.astro4
1 files changed, 2 insertions, 2 deletions
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);
---
<meta http-equiv="refresh" content={`0;url=/${locale}/not-found`} />