Merge pull request #1821 from matrix-org/luke/fix-room-avatar-null-room
Add null-guard to prevent RoomAvatar NPE when room is null
This commit is contained in:
@@ -66,7 +66,8 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
onRoomStateEvents: function(ev) {
|
||||
if (ev.getRoomId() !== this.props.room.roomId ||
|
||||
if (!this.props.room ||
|
||||
ev.getRoomId() !== this.props.room.roomId ||
|
||||
ev.getType() !== 'm.room.avatar'
|
||||
) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user