Fix validateUniqueness/nextTick
This commit is contained in:
parent
50656b8206
commit
61f6d49518
|
@ -328,7 +328,9 @@ function validateCustom(attr, conf, err, done) {
|
|||
* Uniqueness validator
|
||||
*/
|
||||
function validateUniqueness(attr, conf, err, done) {
|
||||
if (blank(this[attr])) return done();
|
||||
if (blank(this[attr])) {
|
||||
return process.nextTick(done);
|
||||
}
|
||||
var cond = {where: {}};
|
||||
cond.where[attr] = this[attr];
|
||||
|
||||
|
|
Loading…
Reference in New Issue