Fix error when a user have no subName

This commit is contained in:
Oswaldo Acauan 2017-08-01 14:50:33 -03:00
parent df35a22676
commit 35fd834397

View File

@ -263,10 +263,13 @@ class UserListItem extends Component {
<span className={styles.userNameMain}> <span className={styles.userNameMain}>
{user.name} <i>{(user.isCurrent) ? `(${intl.formatMessage(messages.you)})` : ''}</i> {user.name} <i>{(user.isCurrent) ? `(${intl.formatMessage(messages.you)})` : ''}</i>
</span> </span>
<span className={styles.userNameSub}> {
{userNameSub userNameSub ?
.reduce((prev, curr) => [prev, ' | ', curr])} <span className={styles.userNameSub}>
</span> {userNameSub.reduce((prev, curr) => [prev, ' | ', curr])}
</span>
: null
}
</div> </div>
); );
} }