You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-19 05:22:13 +03:00
Do not get avatars when no groups were/could be retrieved
This commit is contained in:
@@ -148,6 +148,9 @@ export default class Flair extends React.Component {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Could not get groups for user', this.props.userId, 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);
|
const avatarUrls = await this._getAvatarUrls(groups);
|
||||||
if (!this.unmounted) {
|
if (!this.unmounted) {
|
||||||
this.setState({avatarUrls});
|
this.setState({avatarUrls});
|
||||||
|
|||||||
Reference in New Issue
Block a user