-
Notifications
You must be signed in to change notification settings - Fork 127
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
Possibly unhandled TypeError: Cannot read property 'validate' when using model.post('retrieve') #315
Comments
This works fine for me:
Can you provide a script that triggers this error? |
Using the query |
Hmm this is weird. It doesn't throw an error if I comment out the retrieve hook. I'll dig in some more. |
Alright my bad. it doesnt happen when creating a new model. It happens during filtering. Try adding this snippet at the end of your code and running it
|
Still works for me... |
Can you provide a full script that fails? |
(even when multiple documents are returned) |
In my code there are 2 succeeding filter functions after all placed inside async's so I tried it with your test code. Both filter functions are not necessarily from the same model but should each have results. Sorry I didn't catch this earlier
|
Fixed in 2.1.2 |
Thank you! |
Seems like I spoke too soon. When I run the above code snippet on [email protected], the 2 filter results return undefined:
Same with the code I'm working on now. |
Fixed in 2.1.3 -- sorry the async retrieve hook wasn't fully tested... |
Hi!
Whenever I use:
...and try to query or create that model, I get this error
Here's my model schema:
The Organization model simply contains a name (string) field.
Using [email protected]
Any thoughts?
The text was updated successfully, but these errors were encountered: