diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/background/usecases/completions.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/background/usecases/completions.js b/src/background/usecases/completions.js index af7aaf2..9385760 100644 --- a/src/background/usecases/completions.js +++ b/src/background/usecases/completions.js @@ -183,10 +183,11 @@ export default class CompletionsInteractor { async queryBookmarkItems(name, keywords) { let bookmarks = await this.completionRepository.queryBookmarks(keywords); - return bookmarks.map(page => new CompletionItem({ - caption: page.title, - content: name + ' ' + page.url, - url: page.url - })); + return bookmarks.slice(0, COMPLETION_ITEM_LIMIT) + .map(page => new CompletionItem({ + caption: page.title, + content: name + ' ' + page.url, + url: page.url + })); } } |