You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
This just fails sometimes, when the model.collection.aggregate returns null or undefined.
In the decorateCursor the aggregate.js trys to add the eachAsync function, but as it is undefinde it crashes.
In 4.10 we'll add a special flag useMongooseAggCursor that will let you do M.aggregate([{ $match: { name: 'test' } }]).cursor({ useMongooseAggCursor: true }).eachAsync() without waiting for mongoose to connect 👍
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
This just fails sometimes, when the model.collection.aggregate returns null or undefined.
In the decorateCursor the aggregate.js trys to add the eachAsync function, but as it is undefinde it crashes.
What is the expected behavior?
It should wait till the aggregate is finished or check if the cursur is undefined and return a understandable exception.
Please mention your node.js, mongoose and MongoDB version.
mongoose version: 4.8.6
nodejs version: 6.9.x
The text was updated successfully, but these errors were encountered: