diff options
| author | bors <bors@rust-lang.org> | 2022-05-03 06:09:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-03 06:09:57 +0000 |
| commit | 468492c2af3993f18b1fe98052200575c4a2e678 (patch) | |
| tree | 516b0e6b05e4865256f52689338f5cd43dd14ec5 /src/librustdoc/html/static/js/source-script.js | |
| parent | c110cfa161aab391bd37c16a95b8330bfc7e54ce (diff) | |
| parent | 279d80127a01eae0174ca92e695a926284ea9e1a (diff) | |
| download | rust-468492c2af3993f18b1fe98052200575c4a2e678.tar.gz rust-468492c2af3993f18b1fe98052200575c4a2e678.zip | |
Auto merge of #96663 - JohnTitor:rollup-lthuzdq, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #93097 (Switch settings menu to full js) - #96587 (Refactor the WriteBackendMethods and ExtraBackendMethods traits) - #96589 (Use source callsite in check_argument_types suggestion) - #96599 (Update `RValue::Discriminant` documentation) - #96614 (Add a regression test for #92305) - #96629 (Fix invalid keyword order for function declarations) - #96641 (Use a yes/no enum instead of a bool.) - #96646 (Mitigate impact of subtle invalid call suggestion logic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
| -rw-r--r-- | src/librustdoc/html/static/js/source-script.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js index c48a847665e..6aee0da69f8 100644 --- a/src/librustdoc/html/static/js/source-script.js +++ b/src/librustdoc/html/static/js/source-script.js @@ -6,7 +6,7 @@ /* global search, sourcesIndex */ // Local js definitions: -/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, searchState */ +/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */ /* global updateLocalStorage */ (function() { @@ -195,7 +195,7 @@ const handleSourceHighlight = (function() { const set_fragment = function(name) { const x = window.scrollX, y = window.scrollY; - if (searchState.browserSupportsHistoryApi()) { + if (browserSupportsHistoryApi()) { history.replaceState(null, null, "#" + name); highlightSourceLines(); } else { |
