rustdoc: fix JS error when rendering parse error

This commit is contained in:
Michael Howell 2022-05-03 09:20:45 -07:00
parent 75790fabed
commit 4c183cd2d4

View file

@ -1724,6 +1724,10 @@ window.initSearch = rawSearchIndex => {
`${typeFilter}</h1> in ${crates} </div>`;
if (results.query.error !== null) {
output += `<h3>Query parser error: "${results.query.error}".</h3>`;
output += '<div id="titles">' +
makeTabHeader(0, "In Names", ret_others[1]) +
"</div>";
currentTab = 0;
} else if (results.query.foundElems <= 1 && results.query.returned.length === 0) {
output += `<div id="titles">` +
makeTabHeader(0, "In Names", ret_others[1]) +