Skip to content

Commit 4c183cd

Browse files
committed
rustdoc: fix JS error when rendering parse error
1 parent 75790fa commit 4c183cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/librustdoc/html/static/js/search.js

+4
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,10 @@ window.initSearch = rawSearchIndex => {
17241724
`${typeFilter}</h1> in ${crates} </div>`;
17251725
if (results.query.error !== null) {
17261726
output += `<h3>Query parser error: "${results.query.error}".</h3>`;
1727+
output += '<div id="titles">' +
1728+
makeTabHeader(0, "In Names", ret_others[1]) +
1729+
"</div>";
1730+
currentTab = 0;
17271731
} else if (results.query.foundElems <= 1 && results.query.returned.length === 0) {
17281732
output += `<div id="titles">` +
17291733
makeTabHeader(0, "In Names", ret_others[1]) +

0 commit comments

Comments
 (0)