FIX: Only unsubscribe channel if it was subscribed.
This commit is contained in:
parent
e09a4a353e
commit
8f5349eaa1
|
@ -31,7 +31,8 @@ export default Ember.Controller.extend({
|
|||
},
|
||||
|
||||
unsubscribe() {
|
||||
this.messageBus.unsubscribe(this.get('channel'));
|
||||
const channel = this.get('channel');
|
||||
if (channel) this.messageBus.unsubscribe(channel);
|
||||
this._resetTracking();
|
||||
this.set('channel', null);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue