Applied Coobaha's PR fix - prevents undefined values
This commit is contained in:
parent
bed97a75cb
commit
73330113ae
|
@ -383,7 +383,9 @@ var validators = {
|
|||
|
||||
function getConfigurator(name, opts) {
|
||||
return function () {
|
||||
configure(this, name, arguments, opts);
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
args[1] = args[1] || {};
|
||||
configure(this, name, args, opts);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -649,7 +651,8 @@ function configure(cls, validation, args, opts) {
|
|||
}
|
||||
conf.validation = validation;
|
||||
args.forEach(function (attr) {
|
||||
cls._validations.push([attr, conf, opts]);
|
||||
var validation = opts ? [attr, conf, opts] : [attr, conf];
|
||||
cls._validations.push(validation);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue