From 127247ca34566ac67afec71b4bbf4b937291f721 Mon Sep 17 00:00:00 2001 From: robsmith11 Date: Fri, 17 May 2019 16:14:17 +0000 Subject: Fix openerTabId warning on Android --- src/background/usecases/LinkUseCase.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/background/usecases') 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 { - 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); } } -- cgit v1.2.3