@onehat/data 1.8.22 → 1.8.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.8.22",
3
+ "version": "1.8.24",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1606,15 +1606,18 @@ export default class Repository extends EventEmitter {
1606
1606
  throw Error('this.delete is no longer valid. Repository has been destroyed.');
1607
1607
  }
1608
1608
  if (!entities) {
1609
- return;
1609
+ return false;
1610
1610
  }
1611
1611
  if (!_.isArray(entities)) {
1612
1612
  entities = [entities];
1613
1613
  }
1614
1614
  if (!entities.length) {
1615
- return;
1615
+ return false;
1616
1616
  }
1617
1617
  _.each(entities, (entity) => {
1618
+ if (!entity) {
1619
+ return;
1620
+ }
1618
1621
  if (entity.isPhantom) {
1619
1622
  // Just auto-remove it. Don't bother saving to storage medium.
1620
1623
  this.removeEntity(entity);