Skip to content

Commit

Permalink
experimentation: apply patch derived from sphinx-doc#11959
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Feb 7, 2024
1 parent 04ad76a commit dcc3443
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sphinx/themes/basic/static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,11 @@ const Search = {

// create the mapping
files.forEach((file) => {
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
fileMap.get(file).push(word);
else fileMap.set(file, [word]);
if (!fileMap.has(file)) {
fileMap.set(file, [word]);
} else if (fileMap.get(file).indexOf(word) === -1) {
fileMap.get(file).push(word);
}
});
});

Expand Down

0 comments on commit dcc3443

Please sign in to comment.