Merge pull request #2946 from matrix-org/jryans/release-v1.1.0/guard-room

Check for `room` in all `Room.timeline*` handlers
pull/21833/head
J. Ryan Stinnett 2019-05-03 18:42:10 +01:00 committed by GitHub
commit 19cd02e4e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ export default class RoomBreadcrumbs extends React.Component {
};
onRoomTimeline = (event, room) => {
if (!room) return; // Can be null for the notification timeline, etc.
if (this.state.rooms.map(r => r.room.roomId).includes(room.roomId)) {
this._calculateRoomBadges(room);
}