]> git.0d.be Git - chloro.git/blobdiff - chloro/phyll/static/js/chloro.js
add toc even if there's a single title
[chloro.git] / chloro / phyll / static / js / chloro.js
index dc0015a03d19205176a4f9e0bd67793798145250..8a8064aca5e0575a31f2aa86983bff78061a1c2d 100644 (file)
@@ -35,7 +35,7 @@ function auto_anchors() {
 
 function create_toc() {
   $('#toc').remove();
-  if ($('article h2').length < 2) return;
+  if ($('article h2').length == 0) return;
   $div_toc = $('<div id="toc"><ul></ul></div>');
   $div_toc_ul = $div_toc.find('ul');
   var li_titles = Array();