mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 22:31:19 +08:00
DEV: Fix the Function.prototype.on
deprecation (#8205)
https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on
This commit is contained in:
@ -48,7 +48,7 @@ export default Ember.Component.extend({
|
||||
}
|
||||
},
|
||||
|
||||
_destroyEditor: function() {
|
||||
_destroyEditor: Ember.on("willDestroyElement", function() {
|
||||
if (this._editor) {
|
||||
this._editor.destroy();
|
||||
this._editor = null;
|
||||
@ -59,7 +59,7 @@ export default Ember.Component.extend({
|
||||
}
|
||||
|
||||
$(window).off("ace:resize");
|
||||
}.on("willDestroyElement"),
|
||||
}),
|
||||
|
||||
resize() {
|
||||
if (this._editor) {
|
||||
|
Reference in New Issue
Block a user