diff --git a/src/components/structures/GroupGridView.js b/src/components/structures/GroupGridView.js
index abfd343309..b80eeced0c 100644
--- a/src/components/structures/GroupGridView.js
+++ b/src/components/structures/GroupGridView.js
@@ -16,7 +16,6 @@ limitations under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import OpenRoomsStore from '../../stores/OpenRoomsStore';
import dis from '../../dispatcher';
import RoomView from './RoomView';
@@ -114,13 +113,17 @@ export default class RoomGridView extends React.Component {
"mx_GroupGridView_tile": true,
"mx_GroupGridView_activeTile": isActive,
});
- return ( {this._setActive(i)}} key={roomStore.getRoomId()} className={tileClasses}>
-
- );
+ return ( {this._setActive(i);}}
+ key={roomStore.getRoomId()}
+ className={tileClasses}
+ >
+
+ );
} else {
return ();
}
diff --git a/src/stores/OpenRoomsStore.js b/src/stores/OpenRoomsStore.js
index 764f54d7c2..fabed60c9e 100644
--- a/src/stores/OpenRoomsStore.js
+++ b/src/stores/OpenRoomsStore.js
@@ -182,7 +182,7 @@ class OpenRoomsStore extends Store {
auto_join: payload.auto_join,
oob_data: payload.oob_data,
});
- } catch(err) {
+ } catch (err) {
this._forwardAction({
action: 'view_room_error',
room_id: null,
@@ -223,6 +223,7 @@ class OpenRoomsStore extends Store {
}
__onDispatch(payload) {
+ let proposedIndex;
switch (payload.action) {
// view_room:
// - room_alias: '#somealias:matrix.org'
@@ -253,10 +254,10 @@ class OpenRoomsStore extends Store {
this._forwardingEvent = payload.event;
break;
case 'group_grid_set_active':
- const proposedIndex = this._roomIndex(payload);
+ proposedIndex = this._roomIndex(payload);
if (proposedIndex !== -1) {
this._setState({
- currentIndex: proposedIndex
+ currentIndex: proposedIndex,
});
}
break;