FIX: creating new badge is failing on empty SQL query (#7837)

FIX: creating new badge is failing on empty SQL query (#7837)

diff --git a/app/assets/javascripts/admin/components/ace-editor.js.es6 b/app/assets/javascripts/admin/components/ace-editor.js.es6
index 2fa0c16..d289d7e 100644
--- a/app/assets/javascripts/admin/components/ace-editor.js.es6
+++ b/app/assets/javascripts/admin/components/ace-editor.js.es6
@@ -17,7 +17,7 @@ export default Ember.Component.extend({
 
   @observes("content")
   contentChanged() {
-    if (this._editor && !this._skipContentChangeEvent) {
+    if (this._editor && !this._skipContentChangeEvent && this.content) {
       this._editor.getSession().setValue(this.content);
     }
   },

GitHub sha: ccb3ba50

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: