mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/error: redirect to default about page on 404 error
This commit is contained in:
parent
201f9aaefe
commit
41c23337ff
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,8 @@
|
||||||
if ($page.error?.message === "Not Found") {
|
if ($page.error?.message === "Not Found") {
|
||||||
if ($page.url.pathname.startsWith("/settings")) {
|
if ($page.url.pathname.startsWith("/settings")) {
|
||||||
goto(defaultNavPage("settings"), { replaceState: true });
|
goto(defaultNavPage("settings"), { replaceState: true });
|
||||||
|
} else if ($page.url.pathname.startsWith("/about")) {
|
||||||
|
goto(defaultNavPage("about"), { replaceState: true });
|
||||||
} else {
|
} else {
|
||||||
goto("/", { replaceState: true });
|
goto("/", { replaceState: true });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue