mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 00:25:03 +08:00
Fix picking participants with undefined names
The participant picker wasn't able to find a match for a participant with an undefined name, resulting in sending a null to _onFocusContact() instead of the desired Contact object. Fixes: #177
This commit is contained in:
parent
a43d3a6dda
commit
c506d7a327
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ export default class SidebarParticipantPicker extends React.Component {
|
|||
_onSelectContact = event => {
|
||||
const { sortedContacts } = this.state;
|
||||
const [email, name] = event.target.value.split(SPLIT_KEY);
|
||||
const contact = sortedContacts.find(c => c.name === name && c.email === email);
|
||||
const contact = sortedContacts.find(c => (c.name === name || typeof c.name == "undefined" ) && c.email === email);
|
||||
return Actions.focusContact(contact);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue