From 22d3787d39b4418fc51cd00977a61a1df44deb55 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sun, 19 May 2024 21:22:31 +0200 Subject: [PATCH] fix(BrowserController): Don't spam setIcon warnings Signed-off-by: Marcel Klehr --- src/lib/browser/BrowserController.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lib/browser/BrowserController.js b/src/lib/browser/BrowserController.js index a134e515d4..c80814b873 100644 --- a/src/lib/browser/BrowserController.js +++ b/src/lib/browser/BrowserController.js @@ -363,15 +363,10 @@ export default class BrowserController { } if (icon[status]) { - try { + if (browser.browserAction) { await browser.browserAction.setIcon(icon[status]) - } catch (e) { - console.warn(e) - } - try { + } else if (browser.action) { await browser.action.setIcon(icon[status]) - } catch (e) { - console.warn(e) } } }