1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Refactor contact name code using ternary operator.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
This commit is contained in:
Akintayo A. Olusegun 2021-09-08 02:52:42 +04:00
parent 1ad80f0ae8
commit 0339a8715b

View File

@ -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,
};
}