From 304c1fbb055ba5159ba8730ceddbbd2b676a3c13 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Mon, 27 Feb 2012 09:09:55 -0500 Subject: [PATCH] Gallery failure when CSS does not exist. --- gallery/gallery.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gallery/gallery.js b/gallery/gallery.js index 121f541..e854a7a 100644 --- a/gallery/gallery.js +++ b/gallery/gallery.js @@ -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; -- 2.7.4