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

Commit 35ee7d89 by Lachèze Alexandre

use `_.each` where `_.map` is useless

1 parent fbe3d330
Showing with 1 additions and 1 deletions
...@@ -153,7 +153,7 @@ module.exports = (function() { ...@@ -153,7 +153,7 @@ module.exports = (function() {
options = options || {} options = options || {}
instance.__factory = this instance.__factory = this
Utils._.map(this.attributes, function(definition, name) { Utils._.each(this.attributes, function(definition, name) {
//transform integer 0,1 into boolean //transform integer 0,1 into boolean
if(definition.indexOf(DataTypes.BOOLEAN) !== -1 && typeof instance[name] === "number") { if(definition.indexOf(DataTypes.BOOLEAN) !== -1 && typeof instance[name] === "number") {
instance[name] = (instance[name] === 0) ? false : true; instance[name] = (instance[name] === 0) ? false : true;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!