Don't error out if there's no hash in extractRelationship for V3

This commit is contained in:
Piotr Sarnacki 2015-11-23 16:41:17 +01:00
parent 69dd90b76b
commit b8b1459cf5

View File

@ -28,7 +28,7 @@ export default DS.JSONSerializer.extend({
isNewSerializerAPI: true, isNewSerializerAPI: true,
extractRelationship(type, hash) { extractRelationship(type, hash) {
if(!hash.id && hash['@href']) { if(hash && !hash.id && hash['@href']) {
hash.id = hash['@href']; hash.id = hash['@href'];
} }