Skip to content

Commit

Permalink
fix: pass correct args to keyFor<Attribute|Relationship> when normali…
Browse files Browse the repository at this point in the history
…zing
  • Loading branch information
runspired committed Jan 27, 2022
1 parent 6349ec2 commit 1105d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/serializer/addon/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,11 @@ const JSONSerializer = Serializer.extend({
}

if (get(modelClass, 'attributes').has(key)) {
normalizedKey = this.keyForAttribute(key);
normalizedKey = this.keyForAttribute(key, 'deserialize');
}

if (get(modelClass, 'relationshipsByName').has(key)) {
normalizedKey = this.keyForRelationship(key);
normalizedKey = this.keyForRelationship(key, modelClass, 'deserialize');
}

if (payloadKey !== normalizedKey) {
Expand Down

0 comments on commit 1105d88

Please sign in to comment.