mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Fix test failure (appEvents seems to not be injected?)
This commit is contained in:
parent
2302442e1a
commit
b201697938
1 changed files with 8 additions and 2 deletions
|
@ -26,7 +26,10 @@ export default Ember.Component.extend({
|
|||
this._editor.destroy();
|
||||
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'),
|
||||
|
||||
resize() {
|
||||
|
@ -54,7 +57,10 @@ export default Ember.Component.extend({
|
|||
|
||||
self.$().data('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…
Reference in a new issue