不要怂,就是干,撸起袖子干!

Commit d9b280a5 by sdepold

correct equality check

1 parent 7b969728
Showing with 2 additions and 1 deletions
......@@ -162,7 +162,7 @@ module.exports = (function() {
}
//add default attributes
if(typeof instance[name] == 'undefined') {
if(typeof instance[name] === 'undefined') {
var value = null
if(self.rawAttributes.hasOwnProperty(name) && self.rawAttributes[name].hasOwnProperty('defaultValue')) {
......@@ -172,6 +172,7 @@ module.exports = (function() {
instance[name] = value
instance.addAttribute(name, value)
}
// add validation
if (self.rawAttributes.hasOwnProperty(name) && self.rawAttributes[name].hasOwnProperty('validate')) {
instance.setValidators(name, self.rawAttributes[name].validate)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!