mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Refactor contact name code using ternary operator.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
This commit is contained in:
parent
1ad80f0ae8
commit
0339a8715b
@ -9,7 +9,7 @@ function mapStateToProps(state, ownProps) {
|
||||
const contact = getAddressBookEntry(state, to);
|
||||
return {
|
||||
contact,
|
||||
toName: contact && contact.name ? contact.name : ownProps.toName,
|
||||
toName: contact?.name || ownProps.name,
|
||||
to,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user