Processing Maps can result in calling doValidate
on undefined values + unclear error message
#11501
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Error on calling
create
Error:
If the current behavior is a bug, please provide the steps to reproduce.
reproduction repository & branch: https://github.com/typegoose/typegoose-testing/tree/verify678
What is the expected behavior?
No Error and successful insertion
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
mongoose: 6.2.4
nodejs: 17.6.0
Extra information:
when adding
console.log("doValidate", value, fn, scope, options);
just before the error in mongoose code (meaning just beforereturn value.validate(fn);
inSubdocumentPath.prototype.doValidate
)i get the following values:
Original issue was a typegoose issue: typegoose/typegoose#678
The text was updated successfully, but these errors were encountered: