Merge pull request #550 from pulkitsinghal/master

check if id does not exist a bit more explicitly
This commit is contained in:
Raymond Feng 2015-03-30 08:22:58 -07:00
commit 38114f5676
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}