Skip to content

Commit

Permalink
Merge pull request #5586 from jherdman/backport-5467-to-2.18
Browse files Browse the repository at this point in the history
[BUGFIX Backport] #5467 to 2.18
  • Loading branch information
runspired committed Aug 28, 2018
2 parents c500cfb + 5b384bb commit 2a3e62c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/-private/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,10 @@ Store = Service.extend({

_internalModelDestroyed(internalModel) {
this._removeFromIdMap(internalModel);
this._relationshipsPayloads.unload(internalModel.modelName, internalModel.id);

if (!this.isDestroying) {
this._relationshipsPayloads.unload(internalModel.modelName, internalModel.id);
}
},

/**
Expand Down Expand Up @@ -2720,6 +2723,7 @@ Store = Service.extend({
this._super(...arguments);
this._pushedInternalModels = null;
this.recordArrayManager.destroy();
this._relationshipsPayloads = null;
this._instanceCache.destroy();

this.unloadAll();
Expand Down

0 comments on commit 2a3e62c

Please sign in to comment.