Closed Sebmaster closed 3 months ago
This causes a fairly big issue: A process that encounters this condition will crash. This is due to the way mongoose-lean-getters registers its hook which doesn't catch errors that are thrown. This in turn leads to an uncaughtException when used with cursor.eachAsync.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
mongoose queries error when processing a record which contains
null
as a value of an Array schema type.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Model should be returned without any modification.
What are the versions of Node.js, mongoose-lean-getters, and Mongoose are you are using? Note that "latest" is not a version.
Mongoose: 8.3.4 mongoose-lean-getters: 2.1.0 Node.js: v18.20.2