Skip to content

Commit 110f16f

Browse files
Update apps/nextjs-website/src/app/[locale]/auth/login/page.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f2993ba commit 110f16f

File tree

1 file changed

+7
-6
lines changed
  • apps/nextjs-website/src/app/[locale]/auth/login

1 file changed

+7
-6
lines changed

apps/nextjs-website/src/app/[locale]/auth/login/page.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ const LoginContent = () => {
6767
// eslint-disable-next-line functional/no-try-statements
6868
try {
6969
redirectPath = atob(searchParams.get('redirect') || '');
70-
} finally {
71-
if (redirectPath && canRedirectToUrl(redirectPath)) {
72-
router.replace(redirectPath);
73-
} else {
74-
router.replace(`/${locale}`);
75-
}
70+
} catch {
71+
redirectPath = undefined;
72+
}
73+
if (redirectPath && canRedirectToUrl(redirectPath)) {
74+
router.replace(redirectPath);
75+
} else {
76+
router.replace(`/${locale}`);
7677
}
7778
},
7879
[locale, router, searchParams, user]

0 commit comments

Comments
 (0)