aboutsummaryrefslogtreecommitdiff
path: root/src/console/components/console.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-06-18 20:52:54 +0900
committerGitHub <noreply@github.com>2018-06-18 20:52:54 +0900
commit897e010f42cbc9968cf1058116b0f8bbe9e9a4fd (patch)
tree3cba586e52ef703d1b49a85ad15d91aca4cbc65f /src/console/components/console.js
parent7cae7302bd39a7963b765cd3defd05a093c104a6 (diff)
parentb74acf6f6aef4e4241ba62c72ed8ddb21adc751d (diff)
Merge pull request #417 from ueokande/async-function
Use await/async on e2e test
Diffstat (limited to 'src/console/components/console.js')
-rw-r--r--src/console/components/console.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/console/components/console.js b/src/console/components/console.js
index a9ae4ed..417c9f6 100644
--- a/src/console/components/console.js
+++ b/src/console/components/console.js
@@ -107,16 +107,15 @@ export default class ConsoleComponent {
}
}
- onInput(e) {
+ async onInput(e) {
this.store.dispatch(consoleActions.setConsoleText(e.target.value));
let source = e.target.value;
- return browser.runtime.sendMessage({
+ let completions = await browser.runtime.sendMessage({
type: messages.CONSOLE_QUERY_COMPLETIONS,
text: source,
- }).then((completions) => {
- this.store.dispatch(consoleActions.setCompletions(source, completions));
});
+ this.store.dispatch(consoleActions.setCompletions(source, completions));
}
onInputShown(state) {