Unable to access nested path schemas using Schema#path #10164
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
has repro script
There is a repro script, the Mongoose devs need to confirm that it reproduces the issue
Milestone
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When you try to access the properies of a schema path of a deeply nested schema, it returns undefined.
By bisecting the code between our previous good version (5.10.7) and the current one (5.12.5) we found that the bug was introduced by 037eb14
If the current behavior is a bug, please provide the steps to reproduce.
https://gist.github.com/mcat95/f6dba9774a4c8e02edf169e1f2c12149
What is the expected behavior?
It should return the object with the schema node descriptor:
Instead, it's returning undefined
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js: 14.12.0
Mongoose: 5.12.5
Mongodb: Not relevant, since it's not necessary to connect to a server to reproduce the issue
The text was updated successfully, but these errors were encountered: