Merge pull request #1051 from matrix-org/luke/fix-room-list-undefined-this

Use an arrow function to allow `this`
This commit is contained in:
Luke Barnard 2017-06-07 16:26:30 +01:00 committed by GitHub
commit e9a66625b2

View file

@ -578,7 +578,7 @@ module.exports = React.createClass({
onHeaderClick={ self.onSubListHeaderClick }
onShowMoreRooms={ self.onShowMoreRooms } />
{ Object.keys(self.state.lists).map(function(tagName) {
{ Object.keys(self.state.lists).map((tagName) => {
if (!tagName.match(/^(m\.(favourite|lowpriority)|im\.vector\.fake\.(invite|recent|direct|archived))$/)) {
return <RoomSubList list={ self.state.lists[tagName] }
key={ tagName }