Fix unwanted changes
authorAjay Bura <32841439+ajbura@users.noreply.github.com>
Tue, 6 Sep 2022 08:55:13 +0000 (14:25 +0530)
committerAjay Bura <32841439+ajbura@users.noreply.github.com>
Tue, 6 Sep 2022 08:55:13 +0000 (14:25 +0530)
src/client/state/Notifications.js

index 309c322ae00fc463f7b679f3c84a595d6ead00d5..d332f1f2ce93fcc445922a7b79b8df54495c228b 100644 (file)
@@ -165,7 +165,7 @@ class Notifications extends EventEmitter {
 
   _setNoti(roomId, total, highlight) {
     const addNoti = (id, t, h, fromId) => {
-      const prevTotal = this.roomIdToNoti.has(id) ? this.getT : null;
+      const prevTotal = this.roomIdToNoti.get(id)?.total ?? null;
       const noti = this.getNoti(id);
 
       noti.total += t;