aboutsummaryrefslogtreecommitdiff
path: root/src/background/components/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/components/background.js')
-rw-r--r--src/background/components/background.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/background/components/background.js b/src/background/components/background.js
index 19bf27f..9578e78 100644
--- a/src/background/components/background.js
+++ b/src/background/components/background.js
@@ -36,12 +36,11 @@ export default class BackgroundComponent {
return this.store.dispatch(
tabActions.openToTab(message.url, sender.tab), sender);
case messages.CONSOLE_ENTER_COMMAND:
- return commandActions.exec(message.text, settings.value).catch((e) => {
- return browser.tabs.sendMessage(sender.tab.id, {
- type: messages.CONSOLE_SHOW_ERROR,
- text: e.message,
- });
- });
+ this.store.dispatch(
+ commandActions.exec(message.text, settings.value),
+ sender
+ );
+ return this.broadcastSettingsChanged();
case messages.SETTINGS_QUERY:
return Promise.resolve(this.store.getState().setting.value);
case messages.CONSOLE_QUERY_COMPLETIONS: