diff --git a/src/routes/login.tsx b/src/routes/login.tsx index 6b65cbf..90bf039 100644 --- a/src/routes/login.tsx +++ b/src/routes/login.tsx @@ -65,7 +65,7 @@ export const Route = createFileRoute('/login')({ redirect: z.string().optional().catch('') }), beforeLoad({ context, search }) { - if (!(search.reason !== undefined || context.auth.token === null)) { + if (search.reason === undefined && context.auth.token !== null) { throw redirect({ to: '/recipes' }) } },