diff --git a/src/components/ResultsLimited/index.js b/src/components/ResultsLimited/index.js index 2b8f9f11..73e642ce 100644 --- a/src/components/ResultsLimited/index.js +++ b/src/components/ResultsLimited/index.js @@ -28,7 +28,8 @@ const ResultsLimited = ({ limit, changeLimit, message, disableHandler }) => { const handleChange = values => { const limitValueParsed = parseInt(values.value); if (!Number.isNaN(limitValueParsed) && changeLimit) { - history.pushState(null, '', window.location.href.split('?')[0] + '?limit=' + values.value); + const newUrl = `${window.location.pathname}?limit=${limitValueParsed}${window.location.hash}`; + history.replaceState({ ...history.state, as: newUrl, url: newUrl }, '', newUrl); changeLimit(limitValueParsed === -1 ? null : limitValueParsed); } };