Try improve history navigation by pushing popup changes

This commit is contained in:
2022-03-06 23:56:39 +01:00
parent 9bb5211b4e
commit a9c06a6aaf
2 changed files with 10 additions and 1 deletions

View File

@@ -23,7 +23,12 @@ const updateQueryParams = (id = null, type = null) => {
window.location.port ? `:${window.location.port}` : ""
}${window.location.pathname}${params.toString().length ? `?${params}` : ""}`;
window.history.replaceState({}, "search", url);
if (!window.preventPushState) {
window.history.pushState({}, "search", url);
window.preventPushState = false;
} else {
window.history.replaceState({}, "search", url);
}
};
export default {