use userGroups cached value to avoid re-render
This commit is contained in:
parent
9e55f24092
commit
229c4b98b4
3 changed files with 28 additions and 13 deletions
|
@ -116,7 +116,7 @@ export default class Flair extends React.Component {
|
|||
|
||||
render() {
|
||||
if (this.state.profiles.length === 0) {
|
||||
return <span className="mx_Flair" />;
|
||||
return null;
|
||||
}
|
||||
const avatars = this.state.profiles.map((profile, index) => {
|
||||
return <FlairAvatar key={index} groupProfile={profile} />;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue