Fix: return true in icon API (#669)

This commit is contained in:
eight 2019-03-03 22:29:26 +08:00 committed by Rob Garrison
parent 4262882ac9
commit 1ff34fc449
2 changed files with 5 additions and 3 deletions

View File

@ -42,9 +42,11 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, {
// Chrome 49 doesn't report own extension pages in webNavigation apparently
// so we do a force update which doesn't use the cache.
if (CHROME && CHROME < 2661 && this.sender.tab.url.startsWith(URLS.ownOrigin)) {
return updateIconBadgeForce(this.sender.tab.id, count);
updateIconBadgeForce(this.sender.tab.id, count);
} else {
updateIconBadge(this.sender.tab.id, count);
}
return updateIconBadge(this.sender.tab.id, count);
return true;
},
// exposed for stuff that requires followup sendMessage() like popup::openSettings

View File

@ -299,7 +299,7 @@ const APPLY = (() => {
method: 'invokeAPI',
name: 'updateIconBadge',
args: [count]
}).catch(msg.ignoreError);
}).catch(console.error);
}
function applyStyleState({id, enabled}) {