1
0
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:
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); const contact = getAddressBookEntry(state, to);
return { return {
contact, contact,
toName: contact && contact.name ? contact.name : ownProps.toName, toName: contact?.name || ownProps.name,
to, to,
}; };
} }