aboutsummaryrefslogtreecommitdiff
path: root/src/background/components/tab.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-06-17 20:21:39 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-06-17 21:55:25 +0900
commit48e4bccf0d24bb6ce53c4ecea567ed7750fe8949 (patch)
tree7c16a68489f2894564da18ae059ba492db88907a /src/background/components/tab.js
parent88238005ab64f957d9def8c18473d8210b280de9 (diff)
Use async/await on background
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);
});
}