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

Commit 9866c5d5 by Jochem Maas

remove property check in DAO.prototype.setDataValue - it is not correct and caus…

…es an infinite loop when setting a data value for a field that is as yet unset (via a property setter that has the same name as the original property)
1 parent 2d298a3c
Showing with 0 additions and 3 deletions
...@@ -87,10 +87,7 @@ module.exports = (function() { ...@@ -87,10 +87,7 @@ module.exports = (function() {
} }
DAO.prototype.setDataValue = function(name, value) { DAO.prototype.setDataValue = function(name, value) {
if (this.dataValues && this.dataValues.hasOwnProperty(name))
this.dataValues[name] = value this.dataValues[name] = value
else
this[name] = value
} }
// if an array with field names is passed to save() // if an array with field names is passed to save()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!