mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 02:22:40 +08:00
FIX: don't set properties on destroyed components
This commit is contained in:
@ -279,6 +279,7 @@ export default Ember.Component.extend({
|
|||||||
const markdownOptions = this.get('markdownOptions') || {};
|
const markdownOptions = this.get('markdownOptions') || {};
|
||||||
|
|
||||||
cookAsync(value, markdownOptions).then(cooked => {
|
cookAsync(value, markdownOptions).then(cooked => {
|
||||||
|
if (this.get('isDestroyed')) { return; }
|
||||||
this.set('preview', cooked);
|
this.set('preview', cooked);
|
||||||
Ember.run.scheduleOnce('afterRender', () => {
|
Ember.run.scheduleOnce('afterRender', () => {
|
||||||
if (this._state !== "inDOM") { return; }
|
if (this._state !== "inDOM") { return; }
|
||||||
|
@ -73,6 +73,7 @@ export default Ember.Component.extend({
|
|||||||
previous: this.get('previousState'),
|
previous: this.get('previousState'),
|
||||||
current: this.get('currentState')
|
current: this.get('currentState')
|
||||||
}).then(r => {
|
}).then(r => {
|
||||||
|
if (this.get('isDestroyed')) { return; }
|
||||||
this.set('presenceUsers', r.users);
|
this.set('presenceUsers', r.users);
|
||||||
this.set('channel', r.messagebus_channel);
|
this.set('channel', r.messagebus_channel);
|
||||||
this.messageBus.subscribe(r.messagebus_channel, message => {
|
this.messageBus.subscribe(r.messagebus_channel, message => {
|
||||||
|
Reference in New Issue
Block a user