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