Fix AvatarComposite and DisplayName referencing undefined props (#2222)
This commit is contained in:
@@ -9,7 +9,6 @@ export default class AvatarComposite extends React.PureComponent {
|
||||
accounts: ImmutablePropTypes.list.isRequired,
|
||||
animate: PropTypes.bool,
|
||||
size: PropTypes.number.isRequired,
|
||||
onAccountClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
@@ -80,15 +79,7 @@ export default class AvatarComposite extends React.PureComponent {
|
||||
};
|
||||
|
||||
return (
|
||||
<a
|
||||
href={account.get('url')}
|
||||
target='_blank'
|
||||
onClick={(e) => this.props.onAccountClick(account.get('acct'), e)}
|
||||
title={`@${account.get('acct')}`}
|
||||
key={account.get('id')}
|
||||
>
|
||||
<div style={style} data-avatar-of={`@${account.get('acct')}`} />
|
||||
</a>
|
||||
<div key={account.get('id')} style={style} data-avatar-of={`@${account.get('acct')}`} />
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user