Skip to content

Commit

Permalink
(feat) Add empty string to variables that are not present (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
CynthiaKamau authored Jul 7, 2023
1 parent 1a7f0e6 commit ac8f985
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useTranslation } from 'react-i18next';
import { Tile, StructuredListSkeleton, ContentSwitcher, Switch } from '@carbon/react';
import styles from './care-panel.scss';
import { useEnrollmentHistory } from '../hooks/useEnrollmentHistory';
import isNull from 'lodash-es/isNull';
import ProgramSummary from '../program-summary/program-summary.component';
import ProgramEnrollment from '../program-enrollment/program-enrollment.component';
import PatientSummary from '../patient-summary/patient-summary.component';
Expand Down Expand Up @@ -33,7 +32,7 @@ const CarePanel: React.FC<CarePanelProps> = ({ patientUuid, formEntrySub, launch
return <span>{t('errorProgramEnrollment', 'Error loading program enrollments')}</span>;
}

if (isNull(data)) {
if (data?.length === 0) {
return;
}

Expand Down
Loading

0 comments on commit ac8f985

Please sign in to comment.