Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Add check for fullname at attendee from (#350)
Browse files Browse the repository at this point in the history
* Add check for fullname at attendee from

Signed-off-by: Tomás Castillo <[email protected]>

* Change format to display email if member doesn't have names

Signed-off-by: Tomás Castillo <[email protected]>

---------

Signed-off-by: Tomás Castillo <[email protected]>
  • Loading branch information
tomrndom authored Feb 15, 2024
1 parent e661e1d commit 35ecbcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/forms/attendee-form/attendee-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ class AttendeeForm extends React.Component {
getOptionLabel={
(member) => {
return member.hasOwnProperty("email") ?
`${member.first_name} ${member.last_name} (${member.email})`:
`${member.first_name} ${member.last_name} (${member.id})`;
`${member.first_name && member.last_name ? `${member.first_name} ${member.last_name} (${member.email})` : `${member.email}`}`:
`${member.first_name && member.last_name ? `${member.first_name} ${member.last_name}` : ''} (${member.id})`;
}
}
onChange={this.handleChange}
Expand Down

0 comments on commit 35ecbcc

Please sign in to comment.