Replies: 1 comment
-
In theory there shouldn't be any reason for this. If you can open up an issue and post a code snippet that reproduces this issue, we'd be happy to fix it 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With Mongoose 5.10.11...
We are using a default function in a subdocument to get a field from
this.parent()
but sometimes the value is undefined - despite being in MongoDB itself. Why would that happen? We are not using lean or toObject.Example:
What's really strange is that if I add a default to the the parent field we are trying to use, that does get used!
Example:
Beta Was this translation helpful? Give feedback.
All reactions