From c48c7201adba45af5d72922e0aa5dda455548a84 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 13 Apr 2020 18:41:02 +0900 Subject: Fix bookmark completion on open command --- src/background/completion/impl/BookmarkRepositoryImpl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/background') 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) }); }) }; -- cgit v1.2.3