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); } });