@onehat/data 1.19.0 → 1.19.1
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 +1 -1
- package/src/Schema/Schema.js +1 -5
package/package.json
CHANGED
package/src/Schema/Schema.js
CHANGED
|
@@ -235,13 +235,9 @@ export default class Schema extends EventEmitter {
|
|
|
235
235
|
if (this.isDestroyed) {
|
|
236
236
|
throw Error('this.getPropertyDefinition is no longer valid. Schema has been destroyed.');
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
return _.find(this.model.properties, (propertyDefinition) => {
|
|
239
239
|
return propertyDefinition.name === propertyName;
|
|
240
240
|
});
|
|
241
|
-
if (!propertyDefinition) {
|
|
242
|
-
throw new Error('Property definition ' + propertyName + ' not found.');
|
|
243
|
-
}
|
|
244
|
-
return propertyDefinition;
|
|
245
241
|
}
|
|
246
242
|
|
|
247
243
|
/**
|