From 6c9716637e8be54fa8966bb41fd005cd9bc1d804 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 27 Jun 2017 13:13:00 +0100 Subject: [PATCH] Fix linting errors --- src/components/structures/GroupView.js | 8 ++++---- src/components/structures/MatrixChat.js | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 6e873a9b59..db0b556260 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -39,13 +39,13 @@ module.exports = React.createClass({ this._loadGroupFromServer(this.props.groupId); }, - componentWillReceiveProps: function(new_props) { - if (this.props.groupId != new_props.groupId) { + componentWillReceiveProps: function(newProps) { + if (this.props.groupId != newProps.groupId) { this.setState({ summary: null, error: null, - }) - this._loadGroupFromServer(new_props.groupId); + }); + this._loadGroupFromServer(newProps.groupId); } }, diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index f4da0e6a44..025805d921 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -487,10 +487,12 @@ module.exports = React.createClass({ this.notifyNewScreen('directory'); break; case 'view_group': - const groupId = payload.group_id; - this.setState({currentGroupId: groupId}); - this._setPage(PageTypes.GroupView); - this.notifyNewScreen('group/' + groupId); + { + const groupId = payload.group_id; + this.setState({currentGroupId: groupId}); + this._setPage(PageTypes.GroupView); + this.notifyNewScreen('group/' + groupId); + } break; case 'view_home_page': this._setPage(PageTypes.HomePage);