Skip to content

Commit

Permalink
Cleanup search element getter
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 27, 2019
1 parent cf148a7 commit 1d28083
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ function getSearchElement() {
}
dst = dst[0];
if (window.location.pathname === dst.pathname) {
addClass(document.getElementById("search"), "hidden");
addClass(getSearchElement(), "hidden");
removeClass(main, "hidden");
document.location.href = dst.href;
}
Expand Down Expand Up @@ -2454,7 +2454,7 @@ function getSearchElement() {
function putBackSearch(search_input) {
if (search_input.value !== "") {
addClass(main, "hidden");
removeClass(document.getElementById("search"), "hidden");
removeClass(getSearchElement(), "hidden");
if (browserSupportsHistoryApi()) {
history.replaceState(search_input.value,
"",
Expand Down

0 comments on commit 1d28083

Please # to comment.