Merge pull request #755 from zmijevik/zmijevik-feature/include-if-contains-results

fixes #753
This commit is contained in:
Raymond Feng 2015-11-26 09:33:47 -08:00
commit bc825fafc4
1 changed files with 1 additions and 0 deletions

View File

@ -159,6 +159,7 @@ Inclusion.include = function (objects, include, options, cb) {
var self = this;
if (!include || (Array.isArray(include) && include.length === 0) ||
(Array.isArray(objects) && objects.length === 0) ||
(isPlainObject(include) && Object.keys(include).length === 0)) {
// The objects are empty
return process.nextTick(function() {