@bluemarble/bm-components 0.1.3 → 0.1.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/dist/index.mjs CHANGED
@@ -4172,18 +4172,20 @@ import { useState as useState5 } from "react";
4172
4172
 
4173
4173
  // src/components/utils/getObjectValue.ts
4174
4174
  function getObjectValue(obj) {
4175
- try {
4176
- return (prop) => prop.split(".").reduce((o, k) => o[k], obj);
4177
- } catch (error) {
4178
- return void 0;
4179
- }
4175
+ return (prop) => {
4176
+ try {
4177
+ return prop.split(".").reduce((o, k) => o[k], obj);
4178
+ } catch (error) {
4179
+ return void 0;
4180
+ }
4181
+ };
4180
4182
  }
4181
4183
 
4182
4184
  // src/hooks/useFilter.ts
4183
4185
  function useFilter() {
4184
4186
  const [selectedFilters, setSelectedFilters] = useState5([]);
4185
4187
  const filterBy = (newFilter) => {
4186
- const propToCompare = newFilter.id ? "id" : "prop";
4188
+ const propToCompare = (newFilter == null ? void 0 : newFilter.id) ? "id" : "prop";
4187
4189
  function removeRepeatedFilters(filter) {
4188
4190
  return filter[propToCompare] !== newFilter[propToCompare];
4189
4191
  }