Skip to content

Commit

Permalink
Add missing check
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 2, 2019
1 parent 8f1bbd6 commit 5748b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/main.js
Expand Up @@ -1221,7 +1221,7 @@ function getSearchElement() {
// then an exact path match
path.indexOf(keys[i]) > -1 ||
// next if there is a parent, check for exact parent match
(parent !== undefined &&
(parent !== undefined && parent.name !== undefined &&
parent.name.toLowerCase().indexOf(keys[i]) > -1) ||
// lastly check to see if the name was a levenshtein match
levenshtein(name, keys[i]) <= MAX_LEV_DISTANCE)) {
Expand Down

0 comments on commit 5748b4c

Please sign in to comment.