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