diff --git a/lib/helpers/populate/getModelsMapForPopulate.js b/lib/helpers/populate/getModelsMapForPopulate.js index 07e44587d7..37491964f8 100644 --- a/lib/helpers/populate/getModelsMapForPopulate.js +++ b/lib/helpers/populate/getModelsMapForPopulate.js @@ -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';