@onehat/data 1.22.34 → 1.22.36

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.22.34",
3
+ "version": "1.22.36",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -396,11 +396,13 @@ class OneBuildRepository extends AjaxRepository {
396
396
  return duplicateEntity;
397
397
  }
398
398
 
399
- async loadOneAdditionalEntity(id) {
399
+ async loadOneAdditionalEntity(id, errorIfNotFound = false) {
400
400
  const entity = await this.getSingleEntityFromServer(id);
401
401
  if (!entity) {
402
- this.throwError('entity not found');
403
- return;
402
+ if (errorIfNotFound) {
403
+ this.throwError('Entity not found');
404
+ }
405
+ return null;
404
406
  }
405
407
 
406
408
  this._relayEntityEvents(entity);