FIX: prevents messageBus subscriptions to leak

This commit is contained in:
Joffrey JAFFEUX 2019-06-12 10:20:34 +02:00
parent 2aaa5a920f
commit fe80298ae5
1 changed files with 5 additions and 2 deletions

View File

@ -200,9 +200,12 @@ function initialize(api) {
this.appEvents.trigger("header:update-topic", topic);
});
},
unsubscribe() {
this._super();
if (!this.get("content.id")) return;
this._super(...arguments);
if (!this.get("model.id")) return;
this.messageBus.unsubscribe("/staff/topic-assignment");
}
});