We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b9f5cc commit 56898ecCopy full SHA for 56898ec
src/librustdoc/html/static/main.js
@@ -2955,7 +2955,11 @@ function defocusSearchBar() {
2955
enableSearchInput();
2956
2957
var crateSearchDropDown = document.getElementById("crate-search");
2958
- crateSearchDropDown.addEventListener("focus", loadSearch);
+ // `crateSearchDropDown` can be null in case there is only crate because in that case, the
2959
+ // crate filter dropdown is removed.
2960
+ if (crateSearchDropDown) {
2961
+ crateSearchDropDown.addEventListener("focus", loadSearch);
2962
+ }
2963
var params = getQueryStringParams();
2964
if (params.search !== undefined) {
2965
loadSearch();
0 commit comments