mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
small simplification in code as .getContent()
will always return an object
This commit is contained in:
parent
54c69b4630
commit
422d4cd73a
1 changed files with 1 additions and 2 deletions
|
@ -112,8 +112,7 @@ module.exports = createReactClass({
|
|||
onJoinRule: function(ev) {
|
||||
if (ev.getType() !== "m.room.join_rules") return;
|
||||
if (ev.getRoomId() !== this.props.room.roomId) return;
|
||||
const joinRule = (ev.getContent() || {}).join_rule;
|
||||
this.setState({ joinRule });
|
||||
this.setState({ joinRule: ev.getContent().join_rule });
|
||||
},
|
||||
|
||||
onAccountData: function(accountDataEvent) {
|
||||
|
|
Loading…
Reference in a new issue