Update from 8.8.2 to 8.8.3 causes "Uncaught TypeError: Invalid path
. Must be either string or array"
#15071
Open
2 tasks done
Labels
needs repro script
Maybe a bug, but no repro script. The issue reporter should create a script that demos the issue
Milestone
Prerequisites
Mongoose version
8.8.3
Node.js version
20.18.0
MongoDB server version
7
Typescript version (if applicable)
No response
Description
I tried upgrading Mongoose from 8.8.2 to 8.8.3. But when trying to create a document I got this issue:
Tried to look a little bit and it seems that the problematic line is
for (const { path } of doc.$__schema.childSchemas) {
It seems my schema has a
paths
property but not apath
property and hence anundefined
value is passed down. But that's where my knowledge ends. Cannot say how come.Steps to Reproduce
Sorry but I cannot paste hundreds of lines of company code in here. I have no idea where in my schema the problem is.
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: