diff --git a/addon/transforms/fragment-array.js b/addon/transforms/fragment-array.js index 56b1fc3e..c7cd25dd 100644 --- a/addon/transforms/fragment-array.js +++ b/addon/transforms/fragment-array.js @@ -31,7 +31,7 @@ const FragmentArrayTransform = FragmentTransform.extend({ let store = this.store; return snapshots.map(snapshot => { - let serializer = store.serializerFor(snapshot.modelName); + let serializer = store.serializerFor(snapshot.modelName || snapshot.constructor.modelName); return serializer.serialize(snapshot); }); } diff --git a/addon/transforms/fragment.js b/addon/transforms/fragment.js index d62dfc59..8b080a73 100644 --- a/addon/transforms/fragment.js +++ b/addon/transforms/fragment.js @@ -35,7 +35,7 @@ const FragmentTransform = Transform.extend({ } let store = this.store; - let serializer = store.serializerFor(snapshot.modelName); + let serializer = store.serializerFor(snapshot.modelName || snapshot.constructor.modelName); return serializer.serialize(snapshot); },