alamid-schema
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "alamid-schema", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Extendable mongoose-like schemas for node.js and the browser", | ||
@@ -5,0 +5,0 @@ "main": "lib/Schema.js", |
@@ -19,2 +19,9 @@ "use strict"; | ||
// Return immediately if the field has no validator defined | ||
if (pending === 0) { | ||
setTimeout(function () { | ||
return callback(result); | ||
}, 0); | ||
} | ||
function validationDone(res) { | ||
@@ -131,6 +138,2 @@ pending--; | ||
this.keys.forEach(function (key) { | ||
if (self.validators[key].length === 0) { | ||
return; | ||
} | ||
pending++; | ||
@@ -137,0 +140,0 @@ runValidation(self.validators[key], model[key], model, function (res) { |
47422
1076