Skip to content

Commit

Permalink
fix: Also match words that have more than one query keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
marcbachmann committed May 9, 2020
1 parent c62cd6f commit 05c77c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function prepareSimpleTextSearch (collection, property) {
const result = []
for (const { pruned, elem } of cachedPrunedElements || prunedElements()) {
const match = pruned.match(regex)
if (match && match.length === length) result.push(elem)
if (match && match.length >= length) result.push(elem)
}
return result
}
Expand Down

0 comments on commit 05c77c5

Please sign in to comment.