Skip to content

Commit

Permalink
follow-up fixes for 3701
Browse files Browse the repository at this point in the history
  • Loading branch information
acburdine committed Sep 8, 2015
1 parent 4798ff3 commit 07910e9
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 07910e9

Please sign in to comment.