mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-22 15:01:13 +02:00
Add null-guard to prevent RoomAvatar NPE when room is null
which may have been occuring when peeking into a room that the client hasn't got a Room object for. Fixes https://github.com/vector-im/riot-web/issues/6432
This commit is contained in:
parent
6cb9d28e75
commit
ef427eaf67
@ -66,7 +66,8 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onRoomStateEvents: function(ev) {
|
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'
|
ev.getType() !== 'm.room.avatar'
|
||||||
) return;
|
) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user