DEV: Fix set-after-destroy issues (#15078)

Fixes broken tests on the legacy ember env.
This commit is contained in:
Jarek Radosz
2021-11-24 20:13:52 +01:00
committed by GitHub
parent 9380c1273e
commit e41f98bf96
3 changed files with 16 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ export default Component.extend({
this._super(...arguments);
ajax("/admin/dashboard/new-features.json").then((json) => {
if (!this.element || this.isDestroying || this.isDestroyed) {
return;
}
this.setProperties({
newFeatures: json.new_features,
hasUnseenFeatures: json.has_unseen_features,