diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-04-13 18:54:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-13 18:54:23 +0900 |
commit | bef0d829444be9af1cd90d52013f224e50f33877 (patch) | |
tree | c4260ac22fd17ab188a6542bfb03ed9d7c09f059 /src | |
parent | 494deebd16b757323f266e95ccfc166851073df4 (diff) | |
parent | c48c7201adba45af5d72922e0aa5dda455548a84 (diff) |
Merge pull request #740 from ueokande/completion-performance
Fix bookmark completion on open command
Diffstat (limited to 'src')
-rw-r--r-- | src/background/completion/impl/BookmarkRepositoryImpl.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/background/completion/impl/BookmarkRepositoryImpl.ts b/src/background/completion/impl/BookmarkRepositoryImpl.ts index f34c7d1..3b80b93 100644 --- a/src/background/completion/impl/BookmarkRepositoryImpl.ts +++ b/src/background/completion/impl/BookmarkRepositoryImpl.ts @@ -38,8 +38,8 @@ export default class CachedBookmarkRepository implements BookmarkRepository { private filter(items: HistoryItem[], query: string) { return items.filter(item => { - return query.split(' ').some(keyword => { - return item.title.toLowerCase().includes(keyword.toLowerCase()) || item.url.includes(keyword) + return query.split(' ').every(keyword => { + return item.title.toLowerCase().includes(keyword.toLowerCase()) || item.url!!.includes(keyword) }); }) }; |