Fix including to-many relationships for V3 payloads

This commit is contained in:
Piotr Sarnacki 2015-11-11 12:38:44 +01:00
parent c50c01f8ea
commit e4623d981b

View File

@ -94,8 +94,8 @@ export default DS.JSONSerializer.extend({
}
};
if(Array.isArray(relationship)) {
relationship.forEach(process);
if(Array.isArray(relationship.data)) {
relationship.data.forEach(process);
} else if(relationship && relationship.data) {
process(relationship.data);
}