aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 9f466647..aacebd2c 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -868,21 +868,16 @@ class Backend {
_getBrowserIconTitle() {
return (
- chrome.browserAction !== null &&
- typeof chrome.browserAction === 'object' &&
+ isObject(chrome.browserAction) &&
typeof chrome.browserAction.getTitle === 'function' ?
- new Promise((resolve) => chrome.browserAction.getTitle({}, resolve)) :
- Promise.resolve('')
+ new Promise((resolve) => chrome.browserAction.getTitle({}, resolve)) :
+ Promise.resolve('')
);
}
_updateBadge() {
let title = this._defaultBrowserActionTitle;
- if (
- title === null ||
- chrome.browserAction === null ||
- typeof chrome.browserAction !== 'object'
- ) {
+ if (title === null || !isObject(chrome.browserAction)) {
// Not ready or invalid
return;
}