@firestitch/filter 13.0.5 → 13.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1933,9 +1933,13 @@ class QueryParamsController {
1933
1933
  _replaceState(data) {
1934
1934
  const url = new URL(window.location.href);
1935
1935
  Object.keys(data)
1936
- .filter((name) => data[name] !== undefined && data[name] !== null)
1937
1936
  .forEach((name) => {
1938
- url.searchParams.set(name, data[name]);
1937
+ if (data[name] === undefined || data[name] === null) {
1938
+ url.searchParams.delete(name);
1939
+ }
1940
+ else {
1941
+ url.searchParams.set(name, data[name]);
1942
+ }
1939
1943
  });
1940
1944
  history.replaceState({}, null, url.pathname + url.search);
1941
1945
  }