@onehat/data 1.21.18 → 1.21.19

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.21.18",
3
+ "version": "1.21.19",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1619,7 +1619,7 @@ class Entity extends EventEmitter {
1619
1619
  }
1620
1620
 
1621
1621
  const children = await this.getChildren();
1622
- return _.includes(children, treeNode);
1622
+ return _.includes(children, treeNode);
1623
1623
  }
1624
1624
 
1625
1625
  /**
@@ -805,13 +805,10 @@ class OneBuildRepository extends AjaxRepository {
805
805
  // If children already exist, remove them from the repository
806
806
  // This way, we can reload just a portion of the tree
807
807
  if (!_.isEmpty(treeNode.children)) {
808
- const children = treeNode.children;
809
- treeNode.children = [];
810
-
811
- const oThis = this;
812
- _.each(children, (child) => {
813
- oThis.removeEntity(child);
808
+ _.each(treeNode.children, (child) => {
809
+ treeNode.repository.removeTreeNode(child);
814
810
  });
811
+ treeNode.children = [];
815
812
  }
816
813
 
817
814
  this.markLoading();