Move new var into thunk.

There really was no reason for it to be in the
outer context.
This commit is contained in:
arlaneenalra 2014-02-05 22:21:27 -06:00
parent abd46961da
commit 5252d0e805
1 changed files with 1 additions and 1 deletions

View File

@ -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];