Skip to content

Commit 8a08583

Browse files
authored
Do not redirect on same page (#471)
1 parent 1defac4 commit 8a08583

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useRedirect.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export const useRedirect = (
1717

1818
useEffect(() => {
1919
// If redirect is disabled or the url is already in the callback urls then do not redirect
20-
if (!enable || callBackUrls.current.includes(url)) return;
20+
if (!enable || callBackUrls.current.includes(url) || url === currentPath)
21+
return;
2122

2223
const performRedirect = () => {
2324
if (!isRedirecting.current) {

0 commit comments

Comments
 (0)