-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Uncaught TypeError: Cannot read property 'map' of undefined #3071
Comments
Here is my serializer: export default DS.RESTSerializer.extend(DS.EmbeddedRecordsMixin, {
attrs: {
addresses: { embedded: 'always' },
phones: { embedded: 'always' },
emails: { embedded: 'always' },
notes: { embedded: 'always' },
reminders: { embedded: 'always' },
calls: { embedded: 'always' },
customFields: { embedded: 'always' }
}
}); |
Which line causes it? Can you maybe reproduce your error in a JSBin? There is a sample one in the CONTRIBUTING.md |
This JSBin should replicate the issue. http://jsbin.com/cehelabiqe/4/edit |
I think I ran into the same situation, but the error came out like this for me: https://www.dropbox.com/s/f1qbpy85o3mfw70/Screenshot%202015-05-15%2020.13.09.png?dl=0 |
reverting back to beta-16 works like a charm. |
I'll make a JSBin as soon as I get a chance but mine doesn't even get to the API when I get this error. I'm assuming it's happening for me at serialization. |
Reverting to beta-16.1 flags a lot of deprecation warnings for your |
I was wrong in my previous comment. it looks like it's happening before it sends anything to the server on the save. It could be happening when it tries to serialize a null embedded array. |
You really should normalize your embedded payloads and pass back a |
I agree. We just had some cases where it was unnoticed and it was kinda hard to find the issue. Maybe an assert would be helpful? |
Ping @wecc |
This seems to have returned in 2.0.1. |
I am running into the same error when trying to override the serializeBelongsTo. Use Ember 2.0.1 as @ChrisHonniball |
Receiving:
Uncaught TypeError: Cannot read property 'map' of undefined | embedded-records-mixin.js:485
on beta.17 with Ember 1.12.0.This prevents the
model.save()
request from being sent to the server.The text was updated successfully, but these errors were encountered: