Skip to content

Commit 30ca6c3

Browse files
committed
Fix SchemaBuilderEntity.make()
1 parent bfaaaeb commit 30ca6c3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

builders.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,6 @@ SchemaBuilderEntity.prototype.filter = function(custom, model, reverse) {
261261
return output;
262262
};
263263

264-
SchemaBuilderEntity.prototype.make = function(fn) {
265-
return fn.call(this, this);
266-
};
267-
268264
SchemaBuilderEntity.prototype.$parse = function(name, value, required, custom) {
269265

270266
var type = typeof(value);
@@ -1342,6 +1338,10 @@ SchemaBuilderEntity.prototype.default = function() {
13421338
SchemaBuilderEntity.prototype.make = SchemaBuilderEntity.prototype.load = function(model, callback) {
13431339

13441340
var self = this;
1341+
1342+
if (typeof(model) === FUNCTION)
1343+
return model.call(self, self);
1344+
13451345
var output = self.prepare(model);
13461346

13471347
if (self.onValidation === undefined) {

0 commit comments

Comments
 (0)