Skip to content

Commit a44cd5b

Browse files
committed
set model based on its type
1 parent 378c4dd commit a44cd5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/angular2-jsonapi/src/services/json-api-datastore.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export class JsonApiDatastore {
331331
const models: T[] = [];
332332

333333
body.data.forEach((data: any) => {
334-
const model: T = this.deserializeModel(modelType, data);
334+
const model: T = this.deserializeModel(this.datastoreConfig.models[data.type], data);
335335
this.addToStore(model);
336336

337337
if (body.included) {

0 commit comments

Comments
 (0)