summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-08-24 20:13:26 -0400
committerCorey Hulen <corey@hulen.com>2016-08-24 16:13:26 -0800
commit8efa4dc9a5156c511aae8e3984795e55d4b7947f (patch)
tree2672471bb11b2cd84a98f4e7bfc22eaee45dacf9 /webapp/components/sidebar.jsx
parent7bd26b19273e17ad0b6fb9e7fb89d04b9e171cfe (diff)
downloadchat-8efa4dc9a5156c511aae8e3984795e55d4b7947f.tar.gz
chat-8efa4dc9a5156c511aae8e3984795e55d4b7947f.tar.bz2
chat-8efa4dc9a5156c511aae8e3984795e55d4b7947f.zip
Fixed number in title not appearing for direct messages (#3875)
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r--webapp/components/sidebar.jsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 27fec8822..ad2d6c45c 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -81,11 +81,10 @@ export default class Sidebar extends React.Component {
Object.keys(unreadCounts).forEach((chId) => {
const channel = ChannelStore.get(chId);
- if (channel) {
- if (channel.team_id === this.state.currentTeam.id) {
- msgs += unreadCounts[chId].msgs;
- mentions += unreadCounts[chId].mentions;
- }
+
+ if (channel && (!channel.team_id || channel.team_id === this.state.currentTeam.id)) {
+ msgs += unreadCounts[chId].msgs;
+ mentions += unreadCounts[chId].mentions;
}
});