Fix small flaw in the stylesheet choosing logic
authorAndy Allan <gravitystorm@gmail.com>
Wed, 1 Sep 2010 12:47:42 +0000 (12:47 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Wed, 1 Sep 2010 12:47:42 +0000 (12:47 +0000)
potlatch2.mxml

index b340a7e..6ca3935 100755 (executable)
                     break;
                                }
                        }
-            if (!isSet && theController.stylesheets.length > 0) {
+            if (!isSet) {
+              if(theController.stylesheets.length > 0) {
                 var s:Object = theController.stylesheets[0];
                 setStylesheet(s['label'], s['data']);
-            } else {
+              } else {
                 //hit and hope. FIXME should this be an error state?
                 theController.stylesheets.push({ label:'Potlatch', data:'potlatch.css'});
                 setStylesheet('Potlatch','potlatch.css');
+              }
             }
                }