Merge pull request #2037 from mattermost/plt-1862

PLT-1862 Fix console errors
Этот коммит содержится в:
Corey Hulen
2016-02-01 08:36:09 -08:00
родитель a6d2c2c2d9 12efe8675e
Коммит 1543be8a06
2 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@@ -185,7 +185,10 @@ export default class Sidebar extends React.Component {
let currentChannelName = channel.display_name;
if (channel.type === 'D') {
currentChannelName = Utils.getDirectTeammate(channel.id).username;
const teammate = Utils.getDirectTeammate(channel.id);
if (teammate != null) {
currentChannelName = teammate.username;
}
}
const unread = this.getTotalUnreadCount();