Merge pull request #550 from pulkitsinghal/master
check if id does not exist a bit more explicitly
This commit is contained in:
commit
38114f5676
|
@ -361,7 +361,7 @@ DataAccessObject.updateOrCreate = DataAccessObject.upsert = function upsert(data
|
|||
var hookState = {};
|
||||
|
||||
var id = getIdValue(this, data);
|
||||
if (!id) {
|
||||
if (id === undefined || id === null) {
|
||||
return this.create(data, options, cb);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue