Skip to content

Commit

Permalink
addition of null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
arodidev committed Dec 15, 2023
1 parent 798e94c commit d0f7034
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const MdrTbList: React.FC<PatientChartProps> = ({ patientUuid }) => {

useEffect(() => {
fetchPatientLastEncounter(patientUuid, config.encounterTypes.tbProgramEnrollment).then((encounter) => {
const result = encounter.obs.filter((ob) => ob.concept.uuid === config.obsConcepts.outcome);
if (result.length) {
const result = encounter?.obs?.filter((ob) => ob?.concept?.uuid === config.obsConcepts.outcome);
if (result?.length) {
setIsEmptyOutcome(false);
}
});
Expand Down

0 comments on commit d0f7034

Please sign in to comment.