From 74612bff401b85c405b81e1102e1f9e216ce02ed Mon Sep 17 00:00:00 2001 From: Sandeep Date: Thu, 14 Mar 2024 10:01:24 +0800 Subject: [PATCH] fix: :zap: redirect to default route if the route is not present in the oauth redirect URL --- src/pages/auth.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/auth.tsx b/src/pages/auth.tsx index 1f92738a6..558128389 100644 --- a/src/pages/auth.tsx +++ b/src/pages/auth.tsx @@ -17,7 +17,8 @@ export default function Auth(): JSX.Element { if (is_logged_in) { const params = new URLSearchParams(search); - const redirect_route = params.get('route').replace(/%2F/g, '/') || '/'; + const redirect_route = params.get('route')?.replace(/%2F/g, '/') || '/'; + return ; }