Skip to content

Commit

Permalink
[BUGFIX] dont cause unnecessary work during destroy
Browse files Browse the repository at this point in the history
(cherry picked from commit 07856f2)
  • Loading branch information
runspired authored and rwjblue committed Jun 13, 2018
1 parent 3f6ecdc commit 88191eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/-private/system/store.js
Expand Up @@ -1152,7 +1152,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 @@ -2726,6 +2729,7 @@ Store = Service.extend({
this._pushedInternalModels = null;
this.recordArrayManager.destroy();

this._relationshipsPayloads = null;
this._adapterCache = null;
this._serializerCache = null;

Expand Down

0 comments on commit 88191eb

Please sign in to comment.