@studiometa/js-toolkit 1.7.1 → 1.7.4

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.
package/full.modern.js CHANGED
@@ -7193,7 +7193,7 @@ function updateUrlSearchParam(params, name, value) {
7193
7193
  */
7194
7194
 
7195
7195
 
7196
- function objectToURLSearchParams(obj, defaultSearch = window.location.search) {
7196
+ function objectToURLSearchParams(obj, defaultSearch = typeof window === 'undefined' ? '' : window.location.search) {
7197
7197
  return Object.entries(obj).reduce((urlSearchParams, [name, value]) => updateUrlSearchParam(urlSearchParams, name, value), new URLSearchParams(defaultSearch));
7198
7198
  }
7199
7199
  /**