summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar.jsx
diff options
context:
space:
mode:
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;
}
});