mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Clear theme editor content on switching tabs
Issue happens when sending a null value to ACE Editor. Fixed by sending an empty string to ACE instead of null.
This commit is contained in:
parent
324e182842
commit
f4dc6de9f1
@ -17,8 +17,9 @@ export default Ember.Component.extend({
|
|||||||
|
|
||||||
@observes("content")
|
@observes("content")
|
||||||
contentChanged() {
|
contentChanged() {
|
||||||
if (this._editor && !this._skipContentChangeEvent && this.content) {
|
const content = this.content || "";
|
||||||
this._editor.getSession().setValue(this.content);
|
if (this._editor && !this._skipContentChangeEvent) {
|
||||||
|
this._editor.getSession().setValue(content);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user