FIX: prevents messageBus subscriptions to leak
This commit is contained in:
parent
2aaa5a920f
commit
fe80298ae5
|
@ -200,9 +200,12 @@ function initialize(api) {
|
||||||
this.appEvents.trigger("header:update-topic", topic);
|
this.appEvents.trigger("header:update-topic", topic);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
unsubscribe() {
|
unsubscribe() {
|
||||||
this._super();
|
this._super(...arguments);
|
||||||
if (!this.get("content.id")) return;
|
|
||||||
|
if (!this.get("model.id")) return;
|
||||||
|
|
||||||
this.messageBus.unsubscribe("/staff/topic-assignment");
|
this.messageBus.unsubscribe("/staff/topic-assignment");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue