aboutsummaryrefslogtreecommitdiff
path: root/src/background
diff options
context:
space:
mode:
authorrobsmith11 <robsmith11@yandex.com>2019-05-17 16:14:17 +0000
committerrobsmith11 <robsmith11@yandex.com>2019-05-17 16:14:17 +0000
commit127247ca34566ac67afec71b4bbf4b937291f721 (patch)
treecda337e9038cf4948afd15d3816279846498e071 /src/background
parent59dd41b47901f4096d88ce549b00d3157e1866d7 (diff)
Fix openerTabId warning on Android
Diffstat (limited to 'src/background')
-rw-r--r--src/background/usecases/LinkUseCase.ts7
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);
}
}