From 2e5d2265d4d504e9cb0e31db88b0d06716e67e4b Mon Sep 17 00:00:00 2001 From: wafflesvsfrankie <92288602+burtonemily@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:58:43 +1100 Subject: [PATCH] Update ts/mains/main_node.ts Co-authored-by: Audric Ackermann --- ts/mains/main_node.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ts/mains/main_node.ts b/ts/mains/main_node.ts index a3c018bda..8c7f63a1d 100644 --- a/ts/mains/main_node.ts +++ b/ts/mains/main_node.ts @@ -1026,11 +1026,7 @@ ipc.on('get-start-in-tray', event => { ipcMain.on('update-badge-count', (_event, count) => { if (app.isReady()) { - if (count === 0) { - app.setBadgeCount(0); // Clear the badge - } else { - app.setBadgeCount(count); // Set the badge count - } + app.setBadgeCount(isNumber(count) && isFinite(count) && count >= 0 ? count : 0); } });