Skip to content

Commit

Permalink
fix(populate): support top-level match option for virtual populate
Browse files Browse the repository at this point in the history
Fix #8475
  • Loading branch information
vkarpov15 committed Jan 6, 2020
1 parent f01240e commit a7ab660
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/helpers/populate/getModelsMapForPopulate.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ module.exports = function getModelsMapForPopulate(model, docs, options) {

let match = get(options, 'match', null) ||
get(currentOptions, 'match', null) ||
get(options, 'virtual.options.match', null) ||
get(options, 'virtual.options.options.match', null);

const hasMatchFunction = typeof match === 'function';
Expand Down

0 comments on commit a7ab660

Please sign in to comment.