Address book: handle contact names with length 0.

We were handling non existent contact names, but not
ones with length 0. This fixes this.

Fixes #62.
master
Tom Hacohen 2019-11-17 19:31:03 +02:00
parent fbb3aa154c
commit 8fe360751e
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ const AddressBookItem = React.memo((_props: any) => {
<ListItem
leftIcon={
<Avatar style={{ backgroundColor: getContactColor(entry) }}>
{name && name[0].toUpperCase()}
{name && name[0] && name[0].toUpperCase()}
</Avatar>}
primaryText={name}
onClick={() => onClick(entry)}