aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/LinkUseCase.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-19 15:48:06 +0900
committerGitHub <noreply@github.com>2019-05-19 15:48:06 +0900
commit6ec560bca33e774ff7e363270c423c919fdcf4ce (patch)
treecda337e9038cf4948afd15d3816279846498e071 /src/background/usecases/LinkUseCase.ts
parent05ef6a8ca35aaa801c11eb6b4896caa3690058af (diff)
parent127247ca34566ac67afec71b4bbf4b937291f721 (diff)
Merge pull request #586 from robsmith11/master
Fix warnings on Android
Diffstat (limited to 'src/background/usecases/LinkUseCase.ts')
-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);
}
}