From 9100cff277937998b243efd892d07d6dabf26a55 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Sat, 14 Feb 2026 17:30:17 +1300 Subject: [PATCH] Update +layout.ts --- materialious/src/routes/+layout.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/materialious/src/routes/+layout.ts b/materialious/src/routes/+layout.ts index ef9b4932..118bc2fc 100644 --- a/materialious/src/routes/+layout.ts +++ b/materialious/src/routes/+layout.ts @@ -62,6 +62,7 @@ export async function load({ url }) { } const isLoginPage = url.pathname.endsWith('/internal/login'); + const isSetupPage = url.pathname.endsWith('/setup'); if (!isLoginPage) { const defaultPage = get(interfaceDefaultPage); @@ -71,7 +72,8 @@ export async function load({ url }) { defaultPage !== '/' && defaultPage.startsWith('/') && url.pathname === resolvedRoot && - window.history.length < 3 + window.history.length < 3 && + !isSetupPage ) { getPages().forEach((page) => { if (page.href === defaultPage && (!page.requiresAuth || get(authStore))) { @@ -82,7 +84,7 @@ export async function load({ url }) { if (isOwnBackend()?.requireAuth && !get(rawMasterKeyStore)) { goto(resolve('/internal/login', {}), { replaceState: true }); - } else if (!get(instanceStore) && !isYTBackend() && !url.pathname.endsWith('/setup')) { + } else if (!get(instanceStore) && !isYTBackend() && !isSetupPage) { goto(resolve('/setup', {}), { replaceState: true }); } }