Merge pull request #721 from cookejames/master

findByIds would fail when an array of 0 length was passed as its first argument
This commit is contained in:
Simon Ho 2015-09-23 09:22:49 -07:00
commit 934786200b
1 changed files with 1 additions and 1 deletions

View File

@ -909,7 +909,7 @@ DataAccessObject.findByIds = function(ids, query, options, cb) {
if (isPKMissing(this, cb)) {
return cb.promise;
} else if (ids.length === 0) {
process.nextTick(cb(null, []));
process.nextTick(function(){cb(null, []);});
return cb.promise;
}