DocumentArray#create() throws an error when creating a subdoc with a manually populated path #10749
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?
When checking
SchemaType#_isRef()
,fullPath()
may be undefined if the subdoc was justcreate()
-ed. This means the below script:Throw an error on the
doc.arr.create()
call:If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
No error
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Node.js 14.4
Mongoose 6.0.6
MongoDB 4.4.0
The text was updated successfully, but these errors were encountered: