Permalink
Browse files

fix(lib/query.js): fix bug the model update and delete callback null

  • Loading branch information...
mapleincode committed Mar 17, 2016
1 parent c80a484 commit dff7c5724798488168ab9aa26036bdf3969cbad5
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/query.js
@@ -686,6 +686,9 @@ Query.prototype.update = function(data, callback) {
self.toshihiko.execute(sql, callback);
}
], function(err, result) {
if(err === null) {
err = undefined;
}
callback(err, result, sql);
promisor._onExecuteResult(err, result, sql);
});
@@ -784,6 +787,9 @@ Query.prototype.delete = function(callback) {
self.toshihiko.execute(sql, callback);
}
], function(err, rows) {
if(err === null) {
err = undefined;
}
callback(err, rows, sql);
promisor._onExecuteResult(err, rows, sql);
});

0 comments on commit dff7c57

Please sign in to comment.