Skip to content

Commit

Permalink
Merge pull request #3732 from acburdine/id-fic
Browse files Browse the repository at this point in the history
follow up fixes for #3701
  • Loading branch information
bmac committed Sep 8, 2015
2 parents c208f2c + 07910e9 commit dae800c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions packages/ember-data/lib/system/model/internal-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,7 @@ InternalModel.prototype = {
},

setId: function(id) {
var oldId = this.id;
Ember.assert('A record\'s id cannot be changed once it is in the loaded state', oldId === null || oldId === id || this.isNew());
Ember.assert('A record\'s id cannot be changed once it is in the loaded state', this.id === null || this.id === id || this.isNew());
this.id = id;
},

Expand Down
4 changes: 1 addition & 3 deletions packages/ember-data/lib/system/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,7 @@ Object.defineProperty(Model.prototype, 'id', {
}
},
get() {
if (this._internalModel) {
return this._internalModel.id;
}
return this._internalModel.id;
}
});

Expand Down

0 comments on commit dae800c

Please sign in to comment.