Gallery failure when CSS does not exist.
authorRobert Konigsberg <konigsberg@google.com>
Mon, 27 Feb 2012 14:09:55 +0000 (09:09 -0500)
committerRobert Konigsberg <konigsberg@google.com>
Mon, 27 Feb 2012 14:09:55 +0000 (09:09 -0500)
gallery/gallery.js

index 121f541..e854a7a 100644 (file)
@@ -90,9 +90,11 @@ Gallery.start = function() {
         Gallery.textarea.show("Javascript", demo.run.toString());
       };
 
-      cssLink.onclick = function() {
-        Gallery.textarea.show("CSS", css);
-      };
+      if (css) {
+        cssLink.onclick = function() {
+          Gallery.textarea.show("CSS", css);
+        };
+      }
 
       demo.run(Gallery.workareaChild);
       Gallery.runningDemo = demo;