Skip to content

Commit

Permalink
Rollup merge of #98230 - GuillaumeGomez:weird-js-condition, r=notriddle
Browse files Browse the repository at this point in the history
Fix weird js condition

While going around the code, I found this weird condition. Fixing also affects the generated results in some cases apparently (could only find this one).

Any idea maybe `@notriddle?`

r? `@notriddle`
  • Loading branch information
matthiaskrgr committed Jun 18, 2022
2 parents 0a66e3a + 5fef77d commit 267fe3b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1333,10 +1333,7 @@ function initSearch(rawSearchIndex) {
if (searchWord.indexOf(elem.pathLast) > -1 ||
row.normalizedName.indexOf(elem.pathLast) > -1
) {
// filter type: ... queries
if (!results_others[fullId] !== undefined) {
index = row.normalizedName.indexOf(elem.pathLast);
}
index = row.normalizedName.indexOf(elem.pathLast);
}
lev = levenshtein(searchWord, elem.pathLast);
if (lev > 0 && elem.pathLast.length > 2 && searchWord.indexOf(elem.pathLast) > -1) {
Expand Down

0 comments on commit 267fe3b

Please sign in to comment.