diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-09-28 15:50:42 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-09-28 15:50:42 +0200 |
| commit | b60f71b219412da45e8e910189e374a6ea03c478 (patch) | |
| tree | a892f94b883aa76ac557546ad24f8fdf3caab172 /apps/kit/src/routes | |
| parent | 3a9975ce230a892a8af0286ffa81776d03a8361b (diff) | |
| download | greatoffice-b60f71b219412da45e8e910189e374a6ea03c478.tar.xz greatoffice-b60f71b219412da45e8e910189e374a6ea03c478.zip | |
fix: Align public route checking with new layout groups
Diffstat (limited to 'apps/kit/src/routes')
| -rw-r--r-- | apps/kit/src/routes/(main)/+layout.svelte | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/kit/src/routes/(main)/+layout.svelte b/apps/kit/src/routes/(main)/+layout.svelte index e5b177e..b2b4818 100644 --- a/apps/kit/src/routes/(main)/+layout.svelte +++ b/apps/kit/src/routes/(main)/+layout.svelte @@ -14,9 +14,7 @@ async function redirect_if_necessary(ticket: Navigation) { const sessionIsValid = await is_active(); // TODO: ticket.to can be empty while navigating, so coalesce could probably cause non-public routes to cause a redir to /login... - const isPublicRoute = - (ticket.to?.routeId?.startsWith("(public)") ?? true) || - ticket.to?.routeId?.startsWith("book"); + const isPublicRoute = ticket.to?.routeId?.startsWith("(main)/(public)"); console.log("redir: ", { isPublicRoute, |
