Skip to content

Commit

Permalink
Return early if the record is already destroyed
Browse files Browse the repository at this point in the history
I think there might a better way to do this,
similar to emberjs#5467.

For now, to unblock the upgrade to Ember 3.4, landing this patch.
  • Loading branch information
twokul committed May 13, 2022
1 parent 0624678 commit 400aaea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/-private/system/model/internal-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export default class InternalModel {
}

getRecord(properties) {
if (!this._record && !this._isDematerializing) {
if (!this._record && !this._isDematerializing && !this.isDestroyed) {
heimdall.increment(materializeRecord);
let token = heimdall.start('InternalModel.getRecord');

Expand Down

0 comments on commit 400aaea

Please sign in to comment.