From fbabe79647c8d8e54922155ce976936987ad6616 Mon Sep 17 00:00:00 2001 From: Zoe Date: Fri, 10 Jan 2020 17:35:57 +0000 Subject: [PATCH] use getContent() instead --- src/components/views/rooms/RoomTile.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index f7c58f5c5a..f17ec98d9a 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -115,10 +115,9 @@ module.exports = createReactClass({ const { event: { type, room_id } } = ev; if (type !== "m.room.join_rules") return; if (room_id !== this.props.room.roomId) return; - if ( !event.content ) return; - const { event: { content: { join_rule } } } = ev; - this.setState({ joinRule: join_rule }); /* eslint-enable camelcase */ + const joinRule = event.getContent().join_rule; + this.setState({ joinRule }); }, onAccountData: function(accountDataEvent) {