findByIds would fail when an array of 0 length was passed as its first argument
This commit is contained in:
parent
4b16e3b0bd
commit
6dac956cf8
|
@ -909,7 +909,7 @@ DataAccessObject.findByIds = function(ids, query, options, cb) {
|
||||||
if (isPKMissing(this, cb)) {
|
if (isPKMissing(this, cb)) {
|
||||||
return cb.promise;
|
return cb.promise;
|
||||||
} else if (ids.length === 0) {
|
} else if (ids.length === 0) {
|
||||||
process.nextTick(cb(null, []));
|
process.nextTick(function(){cb(null, []);});
|
||||||
return cb.promise;
|
return cb.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue