1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

do more explicit check

This commit is contained in:
Bruno Windels
2019-02-07 12:18:52 +00:00
parent 62cdf40a39
commit 8eb1f15ed4

View File

@@ -183,7 +183,7 @@ class TagOrderStore extends Store {
const rooms = const rooms =
GroupStore.getGroupRooms(groupId) GroupStore.getGroupRooms(groupId)
.map(r => client.getRoom(r.roomId)) // to Room objects .map(r => client.getRoom(r.roomId)) // to Room objects
.filter(r => !!r); // filter out rooms we haven't joined from the group .filter(r => r !== null && r !== undefined); // filter out rooms we haven't joined from the group
const badge = rooms && RoomNotifs.aggregateNotificationCount(rooms); const badge = rooms && RoomNotifs.aggregateNotificationCount(rooms);
changedBadges[groupId] = (badge && badge.count !== 0) ? badge : undefined; changedBadges[groupId] = (badge && badge.count !== 0) ? badge : undefined;
}); });