Merge pull request #3610 from riking/patch-3

Fix test failure (appEvents seems to not be injected?)
This commit is contained in:
Régis Hanol 2015-07-15 19:16:45 +02:00
commit 23dadfc06e

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