diff options
Diffstat (limited to 'src/background/completion')
-rw-r--r-- | src/background/completion/impl/BookmarkRepositoryImpl.ts | 8 | ||||
-rw-r--r-- | src/background/completion/impl/HistoryRepositoryImpl.ts | 8 | ||||
-rw-r--r-- | src/background/completion/impl/TabRepositoryImpl.ts | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/background/completion/impl/BookmarkRepositoryImpl.ts b/src/background/completion/impl/BookmarkRepositoryImpl.ts index 2bc779d..ed6c5a6 100644 --- a/src/background/completion/impl/BookmarkRepositoryImpl.ts +++ b/src/background/completion/impl/BookmarkRepositoryImpl.ts @@ -23,7 +23,7 @@ export default class CachedBookmarkRepository implements BookmarkRepository { .filter((item) => { let url = undefined; try { - url = new URL(item.url!!); + url = new URL(item.url!); } catch (e) { return false; } @@ -31,8 +31,8 @@ export default class CachedBookmarkRepository implements BookmarkRepository { }) .slice(0, COMPLETION_ITEM_LIMIT) .map((item) => ({ - title: item.title!!, - url: item.url!!, + title: item.title!, + url: item.url!, })); } @@ -41,7 +41,7 @@ export default class CachedBookmarkRepository implements BookmarkRepository { return query.split(" ").every((keyword) => { return ( item.title.toLowerCase().includes(keyword.toLowerCase()) || - item.url!!.includes(keyword) + item.url!.includes(keyword) ); }); }); diff --git a/src/background/completion/impl/HistoryRepositoryImpl.ts b/src/background/completion/impl/HistoryRepositoryImpl.ts index b1992a4..3bf064e 100644 --- a/src/background/completion/impl/HistoryRepositoryImpl.ts +++ b/src/background/completion/impl/HistoryRepositoryImpl.ts @@ -36,8 +36,8 @@ export default class CachedHistoryRepository implements HistoryRepository { .sort((x, y) => Number(y.visitCount) - Number(x.visitCount)) .slice(0, COMPLETION_ITEM_LIMIT) .map((item) => ({ - title: item.title!!, - url: item.url!!, + title: item.title!, + url: item.url!, })); } @@ -59,8 +59,8 @@ export default class CachedHistoryRepository implements HistoryRepository { return items.filter((item) => { return query.split(" ").every((keyword) => { return ( - item.title!!.toLowerCase().includes(keyword.toLowerCase()) || - item.url!!.includes(keyword) + item.title!.toLowerCase().includes(keyword.toLowerCase()) || + item.url!.includes(keyword) ); }); }); diff --git a/src/background/completion/impl/TabRepositoryImpl.ts b/src/background/completion/impl/TabRepositoryImpl.ts index 5e33e5a..a279bd4 100644 --- a/src/background/completion/impl/TabRepositoryImpl.ts +++ b/src/background/completion/impl/TabRepositoryImpl.ts @@ -30,10 +30,10 @@ export default class TabRepositoryImpl implements TabRepository { private static toEntity(tab: browser.tabs.Tab): Tab { return { - id: tab.id!!, - url: tab.url!!, + id: tab.id!, + url: tab.url!, active: tab.active, - title: tab.title!!, + title: tab.title!, faviconUrl: tab.favIconUrl, index: tab.index, }; |