proper class on avatar when image doesnt exist (#9278)

This commit is contained in:
Andreas Cederström 2018-02-07 03:43:27 +01:00 committed by 偏右
parent 7c062bb118
commit f1bd8d0d11

View File

@ -83,7 +83,7 @@ export default class Avatar extends React.Component<AvatarProps, AvatarState> {
const classString = classNames(prefixCls, className, sizeCls, {
[`${prefixCls}-${shape}`]: shape,
[`${prefixCls}-image`]: src,
[`${prefixCls}-image`]: src && this.state.isImgExist,
[`${prefixCls}-icon`]: icon,
});