mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-16 05:09:57 +00:00
16 lines
474 B
Svelte
16 lines
474 B
Svelte
<script lang="ts">
|
|
import { goto } from "$app/navigation";
|
|
import { page } from "$app/stores";
|
|
import { defaultSettingsPage } from "$lib/settings/defaults";
|
|
|
|
$: {
|
|
if ($page.error?.message === "Not Found") {
|
|
if ($page.url.pathname.startsWith("/settings")) {
|
|
goto(defaultSettingsPage(), { replaceState: true });
|
|
} else {
|
|
goto("/", { replaceState: true });
|
|
}
|
|
}
|
|
}
|
|
</script>
|