Skip to content

Commit

Permalink
feat: improve 404 redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
DerStimmler committed Aug 27, 2023
1 parent 5fd70e2 commit 4d146a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
import { goto } from '$app/navigation';
import { base } from '$app/paths';
import { page } from '$app/stores';
goto(`${base}/`);
if ($page.status === 404) goto(`${base}/`);
</script>

0 comments on commit 4d146a2

Please sign in to comment.