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