Move new var into thunk.
There really was no reason for it to be in the outer context.
This commit is contained in:
parent
abd46961da
commit
5252d0e805
|
@ -847,7 +847,6 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, cb
|
|||
var inst = this;
|
||||
var Model = this.constructor
|
||||
var model = Model.modelName;
|
||||
var typedData = {};
|
||||
|
||||
if (typeof data === 'function') {
|
||||
cb = data;
|
||||
|
@ -871,6 +870,7 @@ DataAccessObject.prototype.updateAttributes = function updateAttributes(data, cb
|
|||
} else {
|
||||
inst.trigger('save', function (saveDone) {
|
||||
inst.trigger('update', function (done) {
|
||||
var typedData = {};
|
||||
|
||||
for (var key in data) {
|
||||
inst[key] = data[key];
|
||||
|
|
Loading…
Reference in New Issue