fix: prevent redirect to dashboard on password recovery for logged-in users.

This commit is contained in:
ItzNotABug committed 2024-07-11 13:36:23 +05:30
1 parent da15519128
commit 35b54f8d69
1 file changed
+3
+3
View File
@@ -17,6 +17,9 @@ export const load: LayoutLoad = async ({ depends, url }) => {
url.searchParams.delete('forceRedirect');
}
// logged-in user can recover-password!
if (url.pathname === '/recover') return {};
try {
const account = await sdk.forConsole.account.get<{ organization?: string }>();