Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export class JsonApiDatastore {
const models: T[] = [];

body.data.forEach((data: any) => {
const model: T = this.deserializeModel(modelType, data);
const model: T = this.deserializeModel(this.datastoreConfig.models[data.type], data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we still default to modelType though? So that it doesn't fail in the rare case there is no type field?

Copy link
Author

@mpugach mpugach Jul 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, looks like it is a good idea

maybe it needs some documentation also, do not remember

anyway we ended up ejecting the library from our projects due to the lack of responsiveness to our PRs

so I do not feel like continuing with this one. I gonna close the PRs

thank you for your comment

this.addToStore(model);

if (body.included) {
Expand Down