We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2993ba commit 110f16fCopy full SHA for 110f16f
apps/nextjs-website/src/app/[locale]/auth/login/page.tsx
@@ -67,12 +67,13 @@ const LoginContent = () => {
67
// eslint-disable-next-line functional/no-try-statements
68
try {
69
redirectPath = atob(searchParams.get('redirect') || '');
70
- } finally {
71
- if (redirectPath && canRedirectToUrl(redirectPath)) {
72
- router.replace(redirectPath);
73
- } else {
74
- router.replace(`/${locale}`);
75
- }
+ } catch {
+ redirectPath = undefined;
+ }
+ if (redirectPath && canRedirectToUrl(redirectPath)) {
+ router.replace(redirectPath);
+ } else {
76
+ router.replace(`/${locale}`);
77
}
78
},
79
[locale, router, searchParams, user]
0 commit comments