@onehat/data 1.19.14 → 1.19.15
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 +8 -2
package/package.json
CHANGED
package/src/Schema/Schema.js
CHANGED
|
@@ -236,9 +236,15 @@ export default class Schema extends EventEmitter {
|
|
|
236
236
|
if (this.isDestroyed) {
|
|
237
237
|
throw Error('this.getPropertyDefinition is no longer valid. Schema has been destroyed.');
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
const found = _.clone(_.find(this.model.properties, (propertyDefinition) => {
|
|
240
240
|
return propertyDefinition.name === propertyName;
|
|
241
|
-
});
|
|
241
|
+
}));
|
|
242
|
+
|
|
243
|
+
if (this.model?.validator?.fields && this.model.validator.fields[propertyName]) {
|
|
244
|
+
found.validator = this.model?.validator?.fields[propertyName];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return found;
|
|
242
248
|
}
|
|
243
249
|
|
|
244
250
|
getTitles = () => {
|