Closed meabed closed 1 year ago
The temp fix for validate method is something like
// temporary patch for mongoose7
const oldValidate = mongoose.Document.prototype.validate;
mongoose.Document.prototype.validate = async function (cb = undefined) {
if (cb && typeof cb === 'function') {
return oldValidate.call(this).then(cb);
}
return oldValidate.call(this, ...arguments);
};
https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md
And On wrapResolve there is an error like