From db0f747a77fff27a8a12782f61af33c93852b713 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Sat, 31 Jul 2010 15:50:34 -0400 Subject: [PATCH] Fix format selection help trigger. --- lib/gollum/frontend/public/javascript/gollum.js | 4 +++- lib/gollum/frontend/templates/editbar.mustache | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gollum/frontend/public/javascript/gollum.js b/lib/gollum/frontend/public/javascript/gollum.js index 6bcc7426..9a3b6386 100644 --- a/lib/gollum/frontend/public/javascript/gollum.js +++ b/lib/gollum/frontend/public/javascript/gollum.js @@ -165,7 +165,9 @@ $(function(){ $('#wiki_format').change(function() { var target = $('#editbar .sections .toc div.current').get(0) - sectionItemClick.call(target) + if (target != undefined) { + sectionItemClick.call(target) + } }) var sectionItemClick = function() { diff --git a/lib/gollum/frontend/templates/editbar.mustache b/lib/gollum/frontend/templates/editbar.mustache index 654da7d5..94fd61d0 100644 --- a/lib/gollum/frontend/templates/editbar.mustache +++ b/lib/gollum/frontend/templates/editbar.mustache @@ -30,7 +30,7 @@
-
Headers
+
Headers
Images
Code