diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-07 11:00:34 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-07 11:44:19 +0900 |
commit | 9fb7bf96be786acfbad97f7c76bc423a401dd657 (patch) | |
tree | 69a096e9a8610ae8966af05e91355efdd27ea811 /src/background | |
parent | 45368384d1bbcbc005bf1eb3cdc7f7c8b137c28c (diff) |
fix console errors
Diffstat (limited to 'src/background')
-rw-r--r-- | src/background/index.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/background/index.js b/src/background/index.js index 05d3553..b966c13 100644 --- a/src/background/index.js +++ b/src/background/index.js @@ -1,5 +1,5 @@ -import * as consoleActions from 'actions/console'; import * as settingsActions from 'actions/setting'; +import messages from 'content/messages'; import BackgroundComponent from 'components/background'; import BackgroundInputComponent from 'components/background-input'; import reducers from 'reducers'; @@ -8,7 +8,10 @@ import { createStore } from 'store'; const store = createStore(reducers, (e, sender) => { console.error('Vim-Vixen:', e); if (sender) { - store.dispatch(consoleActions.showError(e.message), sender); + return browser.tabs.sendMessage(sender.tab.id, { + type: messages.CONSOLE_SHOW_ERROR, + text: e.message, + }); } }); const backgroundComponent = new BackgroundComponent(store); |