diff --git a/web/src/routes/+error.svelte b/web/src/routes/+error.svelte index e0d7c610..7b6d52e4 100644 --- a/web/src/routes/+error.svelte +++ b/web/src/routes/+error.svelte @@ -2,8 +2,9 @@ import { goto } from "$app/navigation"; import { page } from "$app/stores"; import { defaultSettingsPage } from "$lib/settings/defaults"; + import { onMount } from "svelte"; - $: { + onMount(() => { if ($page.error?.message === "Not Found") { if ($page.url.pathname.startsWith("/settings")) { goto(defaultSettingsPage(), { replaceState: true }); @@ -11,5 +12,5 @@ goto("/", { replaceState: true }); } } - } + });