diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-26 18:10:58 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-26 18:10:58 +0100 |
| commit | 14f928d49a2fb47fada574c568021ecf3a6d1c0d (patch) | |
| tree | 50ddf17d3ad4706b4b58e28d937e957f71c23452 /src/pages | |
| parent | f2243efa6cb6ca65fbc0f91ac6aadf5f92e38422 (diff) | |
404 works when no valid locale supplied in URL
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/404.astro | 4 |
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`} /> |
