about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-06-19 00:17:16 +0200
committerGitHub <noreply@github.com>2022-06-19 00:17:16 +0200
commit267fe3bf81f0ef2200fb55f12e130d05b1a71aa5 (patch)
tree5f46ea506ce9638b465edc5a52a6cab1f06f1953 /src
parent0a66e3a552be29340bd4a9b7b5068249c20a8136 (diff)
parent5fef77d30e476524b8426f4a359132ca6a432dca (diff)
downloadrust-267fe3bf81f0ef2200fb55f12e130d05b1a71aa5.tar.gz
rust-267fe3bf81f0ef2200fb55f12e130d05b1a71aa5.zip
Rollup merge of #98230 - GuillaumeGomez:weird-js-condition, r=notriddle
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`
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/js/search.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index c726aeeff47..c0b274c0a3f 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -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) {