-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Mongoose 4.13.6 crashes where 4.11.13 was working fine.
If the current behavior is a bug, please provide the steps to reproduce.
Our schemas are use child schemas. Mongoose accesses a length property which does not exist.
This is the stack trace:
TypeError: Cannot read property 'length' of undefined
at Mongoose._applyPlugins (Z:\git\pharos-node-server\node_modules\mongoose\lib\index.js:486:40)
at Mongoose._applyPlugins (Z:\git\pharos-node-server\node_modules\mongoose\lib\index.js:487:10)
at Mongoose._applyPlugins (Z:\git\pharos-node-server\node_modules\mongoose\lib\index.js:487:10)
at Mongoose.model (Z:\git\pharos-node-server\node_modules\mongoose\lib\index.js:396:10)
Are there breaking changes between those versions concerning child schemas?
What is the expected behavior?
Should not crash.
Please mention your node.js, mongoose and MongoDB version.
Node v8.4.0 and MongoDB 3.8.