Skip to content

Commit dabd3a2

Browse files
committed
UI - contactInfo make more generic, to accept a list of source types
1 parent cada0d8 commit dabd3a2

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/client/src/pages/DataView360/components/ContactInfo.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ class ContactInfo extends Component {
2323

2424

2525
populate_participant_with_data_source(participant, participantData) {
26-
return {
27-
first_name: participantData.first_name || participant.first_name,
28-
last_name: participantData.last_name || participant.last_name,
29-
email: participantData.email || participant.email,
30-
mobile: participantData.mobile || participant.mobile,
31-
city: participantData.city || participant.city,
32-
street_and_number: participantData.street_and_number || participant.street_and_number
33-
};
26+
if (participant) {
27+
return {
28+
first_name: participantData.first_name || participant.first_name,
29+
last_name: participantData.last_name || participant.last_name,
30+
email: participantData.email || participant.email,
31+
mobile: participantData.mobile || participant.mobile,
32+
city: participantData.city || participant.city,
33+
street_and_number: participantData.street_and_number || participant.street_and_number
34+
};
35+
}
3436
}
3537

3638
//populates by the order of the source types array

0 commit comments

Comments
 (0)