diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-10 22:27:20 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-10 23:00:59 +0900 |
commit | e76ca380f733b515c31297a285d8bea44e074a1b (patch) | |
tree | b476d9ca41a8bbbcbbad3b3ee13882da9d640d25 /src/background | |
parent | 05ef6a8ca35aaa801c11eb6b4896caa3690058af (diff) |
Make addon-enabled as a clean architecture
Diffstat (limited to 'src/background')
-rw-r--r-- | src/background/infrastructures/ContentMessageClient.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/background/infrastructures/ContentMessageClient.ts b/src/background/infrastructures/ContentMessageClient.ts index d4bc476..2215330 100644 --- a/src/background/infrastructures/ContentMessageClient.ts +++ b/src/background/infrastructures/ContentMessageClient.ts @@ -14,10 +14,10 @@ export default class ContentMessageClient { } async getAddonEnabled(tabId: number): Promise<boolean> { - let { enabled } = await browser.tabs.sendMessage(tabId, { + let enabled = await browser.tabs.sendMessage(tabId, { type: messages.ADDON_ENABLED_QUERY, - }) as { enabled: boolean }; - return enabled; + }); + return enabled as any as boolean; } toggleAddonEnabled(tabId: number): Promise<void> { |