Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix: ⚡ redirect to default route if the route is not present in the o…
Browse files Browse the repository at this point in the history
…auth redirect URL
  • Loading branch information
sandeep-deriv committed Mar 14, 2024
1 parent 86866e0 commit 74612bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Redirect to={redirect_route} />;
}

Expand Down

0 comments on commit 74612bf

Please sign in to comment.