From 6b2dbdf7bacf6530e454c1456ae479a05ce75523 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 4 Jun 2019 15:34:05 -0600 Subject: [PATCH] Don't refresh custom status on logout The RoomTile gets remounted during logout due to the room stores being obliterated, however this causes the render() function to check if it should be showing custom status. If you have custom status enabled, and the person has a status set, the function errors due to no MatrixClient being available. Fixes https://github.com/vector-im/riot-web/issues/9940 --- src/components/views/rooms/RoomTile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 1c98b97559..e1b9567ebd 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -91,6 +91,8 @@ module.exports = React.createClass({ }, _getStatusMessageUser() { + if (!MatrixClientPeg.get()) return null; // We've probably been logged out + const selfId = MatrixClientPeg.get().getUserId(); const otherMember = this.props.room.currentState.getMembersExcept([selfId])[0]; if (!otherMember) {