Do not get avatars when no groups were/could be retrieved
This commit is contained in:
parent
86e8a4c7e2
commit
e89d52ccbf
1 changed files with 3 additions and 0 deletions
|
@ -148,6 +148,9 @@ export default class Flair extends React.Component {
|
|||
} catch (err) {
|
||||
console.error('Could not get groups for user', this.props.userId, err);
|
||||
}
|
||||
if (!groups || groups.length === 0) {
|
||||
return;
|
||||
}
|
||||
const avatarUrls = await this._getAvatarUrls(groups);
|
||||
if (!this.unmounted) {
|
||||
this.setState({avatarUrls});
|
||||
|
|
Loading…
Reference in a new issue