From 603d373cee5f2919ec87cb1548b2d306bbfe7459 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 27 Oct 2021 16:03:41 +0530 Subject: [PATCH] Fix notification minus count Signed-off-by: Ajay Bura --- src/client/state/Notifications.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/state/Notifications.js b/src/client/state/Notifications.js index f5ecce2..b5ba4e0 100644 --- a/src/client/state/Notifications.js +++ b/src/client/state/Notifications.js @@ -103,6 +103,10 @@ class Notifications extends EventEmitter { const prevTotal = noti.total; noti.total -= total; noti.highlight -= highlight; + if (noti.total < 0) { + noti.total = 0; + noti.highlight = 0; + } if (childId && noti.from !== null) { noti.from.delete(childId); }