diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-07-08 21:20:49 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 21:20:49 +0900 |
commit | 37840c2abb02948d36cdcfaab9063f3ea67fdb6b (patch) | |
tree | 2662c396dea1761f57ed508616d2c76389aba5f9 /src/background/actions/tab.js | |
parent | 9f64b19bef06328999a5ed602ba89867402b9d5c (diff) | |
parent | 43beccfe0f323e2363fe97bdb6bc0d71558fda47 (diff) |
Merge pull request #429 from ueokande/use-official-redux
Use official redux
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) => { |