From ac08c37521366721ac00437070b16ae3ddd4f091 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sat, 11 May 2024 13:28:48 +0200 Subject: [PATCH] fix(BrowserController#setStatusBadge): Don't throw when setting icon Signed-off-by: Marcel Klehr --- src/lib/browser/BrowserController.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/browser/BrowserController.js b/src/lib/browser/BrowserController.js index 8dd25af00a..a13ebc8aa8 100644 --- a/src/lib/browser/BrowserController.js +++ b/src/lib/browser/BrowserController.js @@ -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) } } }