diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-06-30 15:34:22 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-06-30 15:34:22 +0200 |
commit | d39f5aa373a4422f7a5f3ee764fb0f6b0b719d61 (patch) | |
tree | 1833f8b72a4b3a8f00d0d143b079a8fcad01c6ae /doc/godocs.js | |
parent | 8652e6c371b8905498d3d314491d36c58d5f68d5 (diff) | |
download | golang-d39f5aa373a4422f7a5f3ee764fb0f6b0b719d61.tar.gz |
Imported Upstream version 58upstream/58
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'); |