diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-05-23 09:45:29 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-05-23 11:04:16 +0200 |
commit | 4e5e42a1c1a9eb757743648c48df70cbd42635db (patch) | |
tree | 64220a5cf0a1ad27206bbcdbc810ea56ba5ed67f /doc/godocs.js | |
parent | fd089e27d7260cee1c7ca449c41cdd0341ebc6cb (diff) | |
download | golang-4e5e42a1c1a9eb757743648c48df70cbd42635db.tar.gz |
Imported Upstream version 2011.05.22
Diffstat (limited to 'doc/godocs.js')
-rw-r--r-- | doc/godocs.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/godocs.js b/doc/godocs.js index 2b3ab065f..946c4c39f 100644 --- a/doc/godocs.js +++ b/doc/godocs.js @@ -28,6 +28,10 @@ function godocs_onload() { function godocs_bindSearchEvents() { var search = document.getElementById('search'); + if (!search) { + // no search box (index disabled) + return; + } function clearInactive() { if (search.className == "inactive") { search.value = ""; @@ -100,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'); |