Skip to content

Commit

Permalink
Only call onHashChange instead of both functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 7, 2019
1 parent 24e093c commit d4527b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function getSearchElement() {
if (match) {
return highlightSourceLines(match, ev);
}
handleHashes();
handleHashes(ev);
}

function expandSection(id) {
Expand Down Expand Up @@ -2652,8 +2652,7 @@ function getSearchElement() {
insertAfter(popup, getSearchElement());
}

handleHashes();
highlightSourceLines();
onHashChange();
window.onhashchange = onHashChange;

buildHelperPopup();
Expand Down

0 comments on commit d4527b7

Please sign in to comment.