1
0
Fork 0

Less magic.

This commit is contained in:
Alan Plum 2015-03-24 18:26:01 +01:00
parent 03ccf67269
commit eb30d2aad0
1 changed files with 1 additions and 7 deletions

View File

@ -108,13 +108,7 @@ Repository = function (collection, opts) {
configurable: false,
enumerable: true,
get: function () {
var schema = this.model.prototype.schema;
if (schema && schema.isJoi) {
return _.object(_.map(schema._inner.children, function (prop) {
return [prop.key, prop.schema];
}));
}
return schema;
return this.model.prototype.schema;
}
});