-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'filter' of undefined #8128
Comments
Happened to me too. I rolled out the version with 5.6.12 and it reported the same error. I have to roll back to 5.6.11 and things are back to normal. |
@sibelius not a very helpful bug report - please provide code samples next time. Stack traces are typically not very helpful 👎 |
the error happens when you are saving many documents at once the error is here https://github.com/Automattic/mongoose/blob/master/lib/model.js#L3251 const docAttributes = docs.filter(function(doc) { docs is null in maybe a regression from here |
this could be the cause of the bug 03dfc6a#diff-af13acd1e8d4818a7336e3dd68eb5efbR15 if |
I cannot share my exact snippet of code that failed but it failed in this way.
I tried to do |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
it is breaking with the following error:
If the current behavior is a bug, please provide the steps to reproduce.
Everything worked well on
5.6.11
but it broke on5.6.12
What is the expected behavior?
it should not break
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
mongoose: 5.6.12
node: 10.15.0
mongo: v4.0.5
The text was updated successfully, but these errors were encountered: