Roo/form/HtmlEditor/ToolbarContext.js
authorAlan Knowles <alan@roojs.com>
Fri, 13 Apr 2012 07:17:22 +0000 (15:17 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 13 Apr 2012 07:17:22 +0000 (15:17 +0800)
Roo/form/HtmlEditor/ToolbarContext.js

Roo/form/HtmlEditor/ToolbarContext.js

index cf6ceb2..a31557e 100644 (file)
@@ -345,13 +345,14 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarContext.prototype,  {
                 });
             }
             
-            var styles = [];
+            var hasStyles
             for(var i in this.styles) {
-                styles.push(i);
+                hasStyles = true;
+                break;
             }
             
             // update styles
-            if (styles.length) { 
+            if (hasStyles) { 
                 var st = this.tb.fields.item(0);
                 
                 st.store.removeAll();