Skip to content

Commit

Permalink
fix(BrowserController#setStatusBadge): Don't throw when setting icon
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed May 11, 2024
1 parent 418e409 commit ac08c37
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/browser/BrowserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,15 @@ export default class BrowserController {
}

if (icon[status]) {
if (navigator.userAgent.includes('Firefox')) {
try {
await browser.browserAction.setIcon(icon[status])
} else {
} catch (e) {
console.warn(e)
}
try {
await browser.action.setIcon(icon[status])
} catch (e) {
console.warn(e)
}
}
}
Expand Down

0 comments on commit ac08c37

Please sign in to comment.