@zengenti/contensis-react-base 3.0.0-beta.38 → 3.0.0-beta.39

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/esm/search.js CHANGED
@@ -261,7 +261,7 @@ const getSelectedFilters = (state, facet = '', context = Context$1.facets, retur
261
261
  const selectedFilters = Object.fromEntries(Object.entries(filters).map(([key, filter = {}]) => [key, (filter.items || []).filter(item => !!(item.isSelected || false)).map(item => {
262
262
  const key = (item === null || item === void 0 ? void 0 : item.key) || '';
263
263
  const isIsoDate = isoDateRegex.test(key);
264
- return isIsoDate ? key : key.toLowerCase();
264
+ return isIsoDate ? key : typeof key.toLowerCase !== 'undefined' ? key.toLowerCase() : key;
265
265
  })]));
266
266
  const fromJS = makeFromJS(returnType);
267
267
  return fromJS(selectedFilters);
@@ -2212,7 +2212,10 @@ const generateFiltersState = ({
2212
2212
  // the search results during SSR without needing to fetch the filters first
2213
2213
 
2214
2214
 
2215
- Object.entries(filterParams).map(([paramName = '', paramValue]) => typeof paramValue === 'string' && paramValue.split(',').map(pVal => filters = addFilterItem(filters, paramName, pVal)));
2215
+ Object.entries(filterParams).map(([paramName = '', paramValue]) => {
2216
+ if (typeof paramValue === 'string') return paramValue.split(',').map(pVal => filters = addFilterItem(filters, paramName, pVal));
2217
+ if (typeof paramValue === 'boolean') filters = addFilterItem(filters, paramName, paramValue);
2218
+ });
2216
2219
  return Object.fromEntries(filters);
2217
2220
  };
2218
2221