diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 49a9cb093da..1459e8f37cd 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -2683,7 +2683,7 @@ function getSearchElement() {
insertAfter(popup, getSearchElement());
}
- onHashChange();
+ onHashChange(null);
window.onhashchange = onHashChange;
buildHelperPopup();