1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 13:19:42 +02:00

Update search.ts

This commit is contained in:
Taly 2022-08-26 17:27:41 +03:00
parent e237f27eb8
commit 6db7fc876c

View file

@ -149,7 +149,9 @@ class Search {
const pagesList: {[key: string]: number} = {};
Object.keys(this.words)
.filter(word => words.indexOf(word) !== -1)
.filter(word => {
return !!words.filter(searchWord => word.indexOf(searchWord) !== -1).length
})
.forEach(word => {
Object.keys(this.words[word])
.forEach(pageId => {