aboutsummaryrefslogtreecommitdiff
path: root/src/background/components/tab.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/background/components/tab.js
parent7cae7302bd39a7963b765cd3defd05a093c104a6 (diff)
parentb74acf6f6aef4e4241ba62c72ed8ddb21adc751d (diff)
Merge pull request #417 from ueokande/async-function
Use await/async on e2e test
Diffstat (limited to 'src/background/components/tab.js')
-rw-r--r--src/background/components/tab.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/background/components/tab.js b/src/background/components/tab.js
index b273546..6af3fd7 100644
--- a/src/background/components/tab.js
+++ b/src/background/components/tab.js
@@ -4,10 +4,9 @@ export default class TabComponent {
constructor(store) {
this.store = store;
- browser.tabs.onActivated.addListener((info) => {
- return browser.tabs.query({ currentWindow: true }).then(() => {
- return this.onTabActivated(info);
- });
+ browser.tabs.onActivated.addListener(async(info) => {
+ await browser.tabs.query({ currentWindow: true });
+ return this.onTabActivated(info);
});
}