Reset preventPushState after a replace
This commit is contained in:
@@ -23,11 +23,11 @@ const updateQueryParams = (id = null, type = null) => {
|
|||||||
window.location.port ? `:${window.location.port}` : ""
|
window.location.port ? `:${window.location.port}` : ""
|
||||||
}${window.location.pathname}${params.toString().length ? `?${params}` : ""}`;
|
}${window.location.pathname}${params.toString().length ? `?${params}` : ""}`;
|
||||||
|
|
||||||
if (!window.preventPushState) {
|
if (window.preventPushState) {
|
||||||
window.history.pushState({}, "search", url);
|
window.history.replaceState({}, "search", url);
|
||||||
window.preventPushState = false;
|
window.preventPushState = false;
|
||||||
} else {
|
} else {
|
||||||
window.history.replaceState({}, "search", url);
|
window.history.pushState({}, "search", url);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user