Skip to content

Commit

Permalink
Add. boundry condition for undefined ref
Browse files Browse the repository at this point in the history
  • Loading branch information
SanoferSameera committed Apr 15, 2024
1 parent 888a08b commit 2090a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/patient-details/patientInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const PatientInfo = (props) => {
function getPhoneNumber(){
if(patient?.phoneNumber !== undefined)
return patient.phoneNumber;
const mobileIdentifier = patient.identifiers.find(identifier => {
const mobileIdentifier = patient.identifiers !== undefined && patient.identifiers.find(identifier => {
return identifier.type === 'MOBILE' || identifier.type === 'MR';
});

Expand Down

0 comments on commit 2090a81

Please sign in to comment.