Fix search replacing

This commit is contained in:
Rafael 2022-02-24 12:42:30 -03:00
parent 2152583816
commit ea43f84347

View file

@ -103,7 +103,7 @@ export default function ShowPage(props: Props) {
// replaceState will fail if on a different domain (like webcache.googleusercontent.com) // replaceState will fail if on a different domain (like webcache.googleusercontent.com)
const hostname = isDev ? 'localhost' : DOMAIN; const hostname = isDev ? 'localhost' : DOMAIN;
if (canonicalUrlPath !== pathname && hostname === window.location.hostname) { if (canonicalUrlPath !== pathname && hostname === window.location.hostname && fullParams !== search) {
const urlParams = new URLSearchParams(search); const urlParams = new URLSearchParams(search);
let replaceUrl = canonicalUrlPath; let replaceUrl = canonicalUrlPath;
if (urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID)) { if (urlParams.get(COLLECTIONS_CONSTS.COLLECTION_ID)) {