Skip to content

Commit

Permalink
Rollup merge of rust-lang#67336 - GuillaumeGomez:fix-js-error, r=Dyla…
Browse files Browse the repository at this point in the history
…n-DPC

Fix JS error when loading page with search

For example when you load this page: https://doc.rust-lang.org/nightly/std/num/struct.NonZeroI8.html?search=foo, you get a nice JS error:

```
TypeError: ev is undefined
```

r? @kinnison
  • Loading branch information
Centril authored Dec 16, 2019
2 parents a1e8a0a + 5f68732 commit 55753a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,7 @@ function getSearchElement() {
insertAfter(popup, getSearchElement());
}

onHashChange();
onHashChange(null);
window.onhashchange = onHashChange;

buildHelperPopup();
Expand Down

0 comments on commit 55753a6

Please sign in to comment.