Skip to content

Commit

Permalink
#83 fixed clearing if part of url have the same value.
Browse files Browse the repository at this point in the history
  • Loading branch information
artzub committed Feb 3, 2022
1 parent dbce349 commit b803e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/hooks/useRedirectTo.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const useRedirectTo = (urlPartType) => {
return useCallback(
(part) => {
const index = order.indexOf(urlPartType);
if (index < 0) {
if (index < 0 || hash[urlPartType] === part) {
return;
}

Expand Down

0 comments on commit b803e18

Please sign in to comment.