diff options
Diffstat (limited to 'src/background/actions/tab.js')
-rw-r--r-- | src/background/actions/tab.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/background/actions/tab.js b/src/background/actions/tab.js index 5cf1e8c..0f32a90 100644 --- a/src/background/actions/tab.js +++ b/src/background/actions/tab.js @@ -4,21 +4,24 @@ const openNewTab = async( url, openerTabId, background = false, adjacent = false ) => { if (!adjacent) { - return browser.tabs.create({ url, active: !background }); + await browser.tabs.create({ url, active: !background }); + return { type: '' }; } let tabs = await browser.tabs.query({ active: true, currentWindow: true }); - return browser.tabs.create({ + await browser.tabs.create({ url, openerTabId, active: !background, index: tabs[0].index + 1 }); + return { type: '' }; }; -const openToTab = (url, tab) => { - return browser.tabs.update(tab.id, { url: url }); +const openToTab = async(url, tab) => { + await browser.tabs.update(tab.id, { url: url }); + return { type: '' }; }; const selected = (tabId) => { |