diff options
author | robsmith11 <robsmith11@yandex.com> | 2019-05-17 15:37:13 +0000 |
---|---|---|
committer | robsmith11 <robsmith11@yandex.com> | 2019-05-17 15:37:13 +0000 |
commit | 59dd41b47901f4096d88ce549b00d3157e1866d7 (patch) | |
tree | d01af801c52a86a475749894733c2319474f7f32 /src/background/usecases | |
parent | f60961947fc9471024081c3c76f940b864336e5f (diff) |
Fix history and bookmarks warnings on Android
Diffstat (limited to 'src/background/usecases')
-rw-r--r-- | src/background/usecases/CompletionsUseCase.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/background/usecases/CompletionsUseCase.ts b/src/background/usecases/CompletionsUseCase.ts index ae1ceed..7f6322e 100644 --- a/src/background/usecases/CompletionsUseCase.ts +++ b/src/background/usecases/CompletionsUseCase.ts @@ -52,13 +52,15 @@ export default class CompletionsUseCase { if (engines.length > 0) { groups.push({ name: 'Search Engines', items: engines }); } - } else if (c === 'h') { + // browser.history not supported on Android + } else if (c === 'h' && typeof browser.history === "object") { // eslint-disable-next-line no-await-in-loop let histories = await this.queryHistoryItems(name, keywords); if (histories.length > 0) { groups.push({ name: 'History', items: histories }); } - } else if (c === 'b') { + // browser.bookmarks not supported on Android + } else if (c === 'b' && typeof browser.bookmarks === "object") { // eslint-disable-next-line no-await-in-loop let bookmarks = await this.queryBookmarkItems(name, keywords); if (bookmarks.length > 0) { |