diff --git a/doc/godocs.js b/doc/godocs.js index 2b3ab065ff6..20ee36350d2 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 = "";