Skip to content

Commit

Permalink
Fix extractId called after extractAttributes (201-created#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
makepanic committed Feb 14, 2017
1 parent de66dce commit 259e396
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addon/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ export default Ember.Mixin.create({
let data;

if (payload) {
const attributes = this.extractAttributes(primaryModelClass, payload),
const id = this.extractId(primaryModelClass, payload),
attributes = this.extractAttributes(primaryModelClass, payload),
relationships = this.extractRelationships(primaryModelClass, payload, included);

data = {
id: this.extractId(primaryModelClass, payload),
id,
type: primaryModelClass.modelName
};
if (Object.keys(attributes).length > 0) {
Expand Down

0 comments on commit 259e396

Please sign in to comment.