Fix test failure (appEvents seems to not be injected?)

This commit is contained in:
Kane York 2015-07-15 10:15:05 -07:00
parent 2302442e1a
commit b201697938

View file

@ -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);
}
});
});