aboutsummaryrefslogtreecommitdiff
path: root/src/background/presenters
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-19 15:48:06 +0900
committerGitHub <noreply@github.com>2019-05-19 15:48:06 +0900
commit6ec560bca33e774ff7e363270c423c919fdcf4ce (patch)
treecda337e9038cf4948afd15d3816279846498e071 /src/background/presenters
parent05ef6a8ca35aaa801c11eb6b4896caa3690058af (diff)
parent127247ca34566ac67afec71b4bbf4b937291f721 (diff)
Merge pull request #586 from robsmith11/master
Fix warnings on Android
Diffstat (limited to 'src/background/presenters')
-rw-r--r--src/background/presenters/IndicatorPresenter.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/background/presenters/IndicatorPresenter.ts b/src/background/presenters/IndicatorPresenter.ts
index d9a615a..5d9c21f 100644
--- a/src/background/presenters/IndicatorPresenter.ts
+++ b/src/background/presenters/IndicatorPresenter.ts
@@ -3,7 +3,13 @@ export default class IndicatorPresenter {
let path = enabled
? 'resources/enabled_32x32.png'
: 'resources/disabled_32x32.png';
- return browser.browserAction.setIcon({ path });
+ if (typeof browser.browserAction.setIcon === "function") {
+ return browser.browserAction.setIcon({ path });
+ }
+ else {
+ // setIcon not supported on Android
+ return Promise.resolve();
+ }
}
onClick(listener: (arg: browser.tabs.Tab) => void): void {