If the filter function is async, it returns after the main filterFunction function instead of properly waiting, which means its return value is not taken into account and the filter doesn’t work.
The only way to make it work so far is to make sure no async operation happens inside the filter, and then remove the await altogether.
As discussed on the Slack this line Object.keys(filter).forEach( { (110) should be await Promise.all( Object.keys(filter).map( async fieldName => ... instead.
See: https://github.com/VulcanJS/Vulcan/blob/devel/packages/vulcan-lib/lib/modules/mongoParams.js#L143
If the filter function is async, it returns after the main
filterFunction
function instead of properly waiting, which means its return value is not taken into account and the filter doesn’t work.The only way to make it work so far is to make sure no async operation happens inside the filter, and then remove the
await
altogether.