Fix openerTabId warning on Android
This commit is contained in:
parent
59dd41b479
commit
127247ca34
1 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue