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

Commit 74612bf

Browse files
committed
fix: ⚡ redirect to default route if the route is not present in the oauth redirect URL
1 parent 86866e0 commit 74612bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pages/auth.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export default function Auth(): JSX.Element {
1717

1818
if (is_logged_in) {
1919
const params = new URLSearchParams(search);
20-
const redirect_route = params.get('route').replace(/%2F/g, '/') || '/';
20+
const redirect_route = params.get('route')?.replace(/%2F/g, '/') || '/';
21+
2122
return <Redirect to={redirect_route} />;
2223
}
2324

0 commit comments

Comments
 (0)