Code cleanup in lib/dao.js
Rename callback argument "result" to "info" to make it consistent with other places where we use "info" too. Remove traling whitespace.
This commit is contained in:
parent
1461400f72
commit
3a51510119
|
@ -410,7 +410,7 @@ DataAccessObject.updateOrCreate = DataAccessObject.upsert = function upsert(data
|
|||
self.getDataSource().connector
|
||||
.updateOrCreate(Model.modelName, update, done);
|
||||
|
||||
function done(err, data, result) {
|
||||
function done(err, data, info) {
|
||||
var obj;
|
||||
if (data && !(data instanceof Model)) {
|
||||
inst._initProperties(data, { persisted: true });
|
||||
|
@ -427,7 +427,7 @@ DataAccessObject.updateOrCreate = DataAccessObject.upsert = function upsert(data
|
|||
var context = {
|
||||
Model: Model,
|
||||
instance: obj,
|
||||
isNewInstance: result ? result.isNewInstance : undefined,
|
||||
isNewInstance: info ? info.isNewInstance : undefined,
|
||||
hookState: hookState,
|
||||
options: options
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue