Skip to content

Commit

Permalink
FIX: prevents exception when clicking component title above ace editor (
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed Mar 30, 2020
1 parent acdbcab commit f8cb46c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/assets/javascripts/admin/components/ace-editor.js
Expand Up @@ -57,7 +57,7 @@ export default Component.extend({
}
if (this.appEvents) {
// xxx: don't run during qunit tests
this.appEvents.off("ace:resize", this, this.resize);
this.appEvents.off("ace:resize", this, "resize");
}

$(window).off("ace:resize");
Expand Down Expand Up @@ -97,9 +97,7 @@ export default Component.extend({

$(window)
.off("ace:resize")
.on("ace:resize", () => {
this.appEvents.trigger("ace:resize");
});
.on("ace:resize", () => this.appEvents.trigger("ace:resize"));

if (this.appEvents) {
// xxx: don't run during qunit tests
Expand Down

0 comments on commit f8cb46c

Please sign in to comment.