@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
|
@@ -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
|
-
|
|
403
|
-
|
|
402
|
+
if (errorIfNotFound) {
|
|
403
|
+
this.throwError('Entity not found');
|
|
404
|
+
}
|
|
405
|
+
return null;
|
|
404
406
|
}
|
|
405
407
|
|
|
406
408
|
this._relayEntityEvents(entity);
|