Skip to content

A platform for community discussion. Free, open, simple.

FIX: Clear theme editor content on switching tabs

Penar Musarajf4dc6de9f13f
diff --git a/app/assets/javascripts/admin/components/ace-editor.js.es6 b/app/assets/javascripts/admin/components/ace-editor.js.es6
index d289d7e47f5..ff3203f9d3d 100644
--- a/app/assets/javascripts/admin/components/ace-editor.js.es6
+++ b/app/assets/javascripts/admin/components/ace-editor.js.es6
@@ -17,8 +17,9 @@ export default Ember.Component.extend({
@observes("content")
contentChanged() {
- if (this._editor && !this._skipContentChangeEvent && this.content) {
- this._editor.getSession().setValue(this.content);
+ const content = this.content || "";
+ if (this._editor && !this._skipContentChangeEvent) {
+ this._editor.getSession().setValue(content);
}
},