mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00:00
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…
x
Reference in New Issue
Block a user