forked from XimeX/usrspace-browser-addon
combine updateBadge promises
This commit is contained in:
parent
d450b9ef22
commit
5f3af74c07
|
@ -23,16 +23,11 @@ const updateBadge = (open) => {
|
||||||
badgeText = browser.browserAction.setBadgeText({text: ''});
|
badgeText = browser.browserAction.setBadgeText({text: ''});
|
||||||
badgeColor = browser.browserAction.setBadgeBackgroundColor({color: null});
|
badgeColor = browser.browserAction.setBadgeBackgroundColor({color: null});
|
||||||
}
|
}
|
||||||
badgeText.then(() => {
|
Promise.all([badgeText, badgeColor])
|
||||||
|
.then()
|
||||||
}).catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
});
|
});
|
||||||
badgeColor.then(() => {
|
|
||||||
|
|
||||||
}).catch((error) => {
|
|
||||||
console.error(error);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendNotification = (open) => {
|
const sendNotification = (open) => {
|
||||||
|
|
Loading…
Reference in New Issue