diff options
Diffstat (limited to 'src/reducers/command.js')
-rw-r--r-- | src/reducers/command.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reducers/command.js b/src/reducers/command.js index 7e03593..b645e29 100644 --- a/src/reducers/command.js +++ b/src/reducers/command.js @@ -1,23 +1,23 @@ import * as tabs from '../background/tabs'; import actions from '../actions'; -const cmdBuffer = (sender, arg) => { +const cmdBuffer = (tab, arg) => { if (isNaN(arg)) { - return tabs.selectByKeyword(sender.tab, arg); + return tabs.selectByKeyword(tab, arg); } else { let index = parseInt(arg, 10) - 1; return tabs.selectAt(index); } } -export default function reducer(state, action, sender) { +export default function reducer(state, action, sendToTab) { switch (action.type) { case actions.COMMAND_OPEN_URL: - return browser.tabs.update(sender.tab.id, { url: action.url }); + return browser.tabs.update(sendToTab.id, { url: action.url }); case actions.COMMAND_TABOPEN_URL: return browser.tabs.create({ url: action.url }); case actions.COMMAND_BUFFER: - return cmdBuffer(sender, action.keywords); + return cmdBuffer(sendToTab, action.keywords); default: return Promise.resolve(); } |