Avoid array conversion in UserList
This commit is contained in:
parent
6a6aedc5da
commit
9b9bef3695
@ -58,9 +58,9 @@ var UserList = React.createClass({
|
||||
if (!tab.channel || tab.channel[0] !== '#') {
|
||||
style.display = 'none';
|
||||
} else {
|
||||
users = this.state.users.map(user => {
|
||||
return <UserListItem key={user.nick} user={user} />;
|
||||
}).toArray(); // React Infinite uses .length
|
||||
this.state.users.forEach(user => {
|
||||
users.push(<UserListItem key={user.nick} user={user} />);
|
||||
});
|
||||
}
|
||||
|
||||
if (users.length > 1) {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user