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] !== '#') {
|
if (!tab.channel || tab.channel[0] !== '#') {
|
||||||
style.display = 'none';
|
style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
users = this.state.users.map(user => {
|
this.state.users.forEach(user => {
|
||||||
return <UserListItem key={user.nick} user={user} />;
|
users.push(<UserListItem key={user.nick} user={user} />);
|
||||||
}).toArray(); // React Infinite uses .length
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (users.length > 1) {
|
if (users.length > 1) {
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user