diff options
author | robsmith11 <robsmith11@yandex.com> | 2019-05-17 16:14:17 +0000 |
---|---|---|
committer | robsmith11 <robsmith11@yandex.com> | 2019-05-17 16:14:17 +0000 |
commit | 127247ca34566ac67afec71b4bbf4b937291f721 (patch) | |
tree | cda337e9038cf4948afd15d3816279846498e071 /src/background/usecases/LinkUseCase.ts | |
parent | 59dd41b47901f4096d88ce549b00d3157e1866d7 (diff) |
Fix openerTabId warning on Android
Diffstat (limited to 'src/background/usecases/LinkUseCase.ts')
-rw-r--r-- | src/background/usecases/LinkUseCase.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/background/usecases/LinkUseCase.ts b/src/background/usecases/LinkUseCase.ts index 2f4df7b..21cf0e7 100644 --- a/src/background/usecases/LinkUseCase.ts +++ b/src/background/usecases/LinkUseCase.ts @@ -12,8 +12,9 @@ export default class LinkUseCase { } openNewTab(url: string, openerId: number, background: boolean): Promise<any> { - return this.tabPresenter.create(url, { - openerTabId: openerId, active: !background - }); + // openerTabId not supported on Android + let properties = typeof browser.tabs.Tab === "object" ? + { openerTabId: openerId, active: !background } : { active: !background }; + return this.tabPresenter.create(url, properties); } } |