File tree 1 file changed +1
-5
lines changed
src/librustdoc/html/static/js
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1888,11 +1888,7 @@ function initSearch(rawSearchIndex) {
1888
1888
function showResults ( results , go_to_first , filterCrates ) {
1889
1889
const search = searchState . outputElement ( ) ;
1890
1890
if ( go_to_first || ( results . others . length === 1
1891
- && getSettingValue ( "go-to-only-result" ) === "true"
1892
- // By default, the search DOM element is "empty" (meaning it has no children not
1893
- // text content). Once a search has been run, it won't be empty, even if you press
1894
- // ESC or empty the search input (which also "cancels" the search).
1895
- && ( ! search . firstChild || search . firstChild . innerText !== searchState . loadingText ) )
1891
+ && getSettingValue ( "go-to-only-result" ) === "true" )
1896
1892
) {
1897
1893
const elem = document . createElement ( "a" ) ;
1898
1894
elem . href = results . others [ 0 ] . href ;
You can’t perform that action at this time.
0 commit comments