Email for professionals and teams
ignore auth for new db
Hieu Nguyen (Jack)b24535647c8f
diff --git a/src/app/(auth)/setup/page.tsx b/src/app/(auth)/setup/page.tsxindex 691f71e..6e8c632 100644--- a/src/app/(auth)/setup/page.tsx+++ b/src/app/(auth)/setup/page.tsx@@ -14,7 +14,9 @@ export default async function SetupPage() {const env = getEnv();if (!(await hasAdminAccount(env))) {const cookieStore = await cookies();- const user = await getUserFromSession(env, cookieStore.get(SESSION_COOKIE)?.value);+ // An empty database has no sessions table yet (prepare migrates it from the+ // client), so a stale cookie from an earlier install must not 500 the page.+ const user = await getUserFromSession(env, cookieStore.get(SESSION_COOKIE)?.value).catch(() => null);if (user && !user.disabled) redirect("/inbox");return (<AuthGuard mode="public">