Skip to content

Commit 63e7663

Browse files
authored
Update sphinx/themes/basic/static/searchtools.js
1 parent 728fcf1 commit 63e7663

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sphinx/themes/basic/static/searchtools.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,10 @@ const Search = {
496496

497497
// create the mapping
498498
files.forEach((file) => {
499-
if (fileMap.has(file)) {
500-
if (fileMap.get(file).indexOf(word) === -1) {
501-
fileMap.get(file).push(word);
502-
}
503-
} else {
499+
if (!fileMap.has(file)) {
504500
fileMap.set(file, [word]);
501+
} else if (fileMap.get(file).indexOf(word) === -1) {
502+
fileMap.get(file).push(word);
505503
}
506504
});
507505
});

0 commit comments

Comments
 (0)