From f8cb46c0e1886992b45ee9860e0f9ceab2c6851b Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 30 Mar 2020 18:55:15 +0200 Subject: [PATCH] FIX: prevents exception when clicking component title above ace editor (#9309) --- app/assets/javascripts/admin/components/ace-editor.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/admin/components/ace-editor.js b/app/assets/javascripts/admin/components/ace-editor.js index 4fc881dae4f..123193c0c0b 100644 --- a/app/assets/javascripts/admin/components/ace-editor.js +++ b/app/assets/javascripts/admin/components/ace-editor.js @@ -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"); @@ -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