combine updateBadge promises

This commit is contained in:
Thomas Rupprecht 2019-08-28 21:50:01 +02:00
parent d450b9ef22
commit 5f3af74c07
1 changed files with 5 additions and 10 deletions

View File

@ -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) => {