diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 49a9cb093da2a..1459e8f37cd32 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();