@civicactions/cmsds-open-data-components 3.1.6 → 3.1.7

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/main.js CHANGED
@@ -1341,10 +1341,10 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
1341
1341
  });
1342
1342
  (0, $hgUW1$useEffect)(()=>{
1343
1343
  if (data) {
1344
- const propertyKeys = data.schema[id] && data.schema[id].fields ? Object.keys(data.schema[id].fields) : [];
1344
+ const propertyKeys = data.schema && data.schema[id] && data.schema[id].fields ? Object.keys(data.schema[id].fields) : [];
1345
1345
  setValues(data.results), setCount(data.count);
1346
1346
  if (propertyKeys.length) setColumns(prepareColumns ? prepareColumns(propertyKeys) : propertyKeys);
1347
- setSchema(data.schema);
1347
+ if (data.schema) setSchema(data.schema);
1348
1348
  }
1349
1349
  }, [
1350
1350
  data