mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
FIX: Only unsubscribe channel if it was subscribed.
This commit is contained in:
parent
e09a4a353e
commit
8f5349eaa1
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,8 @@ export default Ember.Controller.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
unsubscribe() {
|
unsubscribe() {
|
||||||
this.messageBus.unsubscribe(this.get('channel'));
|
const channel = this.get('channel');
|
||||||
|
if (channel) this.messageBus.unsubscribe(channel);
|
||||||
this._resetTracking();
|
this._resetTracking();
|
||||||
this.set('channel', null);
|
this.set('channel', null);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue