mirror of
https://github.com/discourse/discourse.git
synced 2025-02-23 04:55:00 +00:00
Merge pull request #3610 from riking/patch-3
Fix test failure (appEvents seems to not be injected?)
This commit is contained in:
commit
23dadfc06e
@ -26,7 +26,10 @@ export default Ember.Component.extend({
|
|||||||
this._editor.destroy();
|
this._editor.destroy();
|
||||||
this._editor = null;
|
this._editor = null;
|
||||||
}
|
}
|
||||||
this.appEvents.off('ace:resize', this, this.resize);
|
if (this.appEvents) {
|
||||||
|
// xxx: don't run during qunit tests
|
||||||
|
this.appEvents.off('ace:resize', this, this.resize);
|
||||||
|
}
|
||||||
}.on('willDestroyElement'),
|
}.on('willDestroyElement'),
|
||||||
|
|
||||||
resize() {
|
resize() {
|
||||||
@ -54,7 +57,10 @@ export default Ember.Component.extend({
|
|||||||
|
|
||||||
self.$().data('editor', editor);
|
self.$().data('editor', editor);
|
||||||
self._editor = editor;
|
self._editor = editor;
|
||||||
self.appEvents.on('ace:resize', self, self.resize);
|
if (self.appEvents) {
|
||||||
|
// xxx: don't run during qunit tests
|
||||||
|
self.appEvents.on('ace:resize', self, self.resize);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user