]> Cypherpunks repositories - gostls13.git/commitdiff
godoc: don't display navigation list with only 1 element
authorAndrew Gerrand <adg@golang.org>
Fri, 20 May 2011 04:26:00 +0000 (14:26 +1000)
committerAndrew Gerrand <adg@golang.org>
Fri, 20 May 2011 04:26:00 +0000 (14:26 +1000)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4547056

doc/godocs.js

index 20ee36350d2343ebe15c5a6699ecd201d6d04a7f..946c4c39fde3efa7ea6d101809a18cf451286845 100644 (file)
@@ -104,7 +104,7 @@ function godocs_generateTOC() {
     }
   }
 
-  if (!toc_items.length) { return; }
+  if (toc_items.length <= 1) { return; }
 
   var dl1 = document.createElement('dl');
   var dl2 = document.createElement('dl');