Skip to content

Commit

Permalink
update codeFilter array initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahmcdougall committed Oct 18, 2023
1 parent 1e1afa5 commit bead5ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gaps/GapsReportBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,11 @@ export function addFiltersToDataRequirement(
const cf = generateDetailedCodeFilter(df as EqualsFilter | InFilter, q.dataType);

if (cf !== null) {
dataRequirement.codeFilter?.push(cf);
if (dataRequirement.codeFilter) {
dataRequirement.codeFilter.push(cf);
} else {
dataRequirement.codeFilter = [cf];

Check warning on line 632 in src/gaps/GapsReportBuilder.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}

Check warning on line 633 in src/gaps/GapsReportBuilder.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
}
} else if (df.type === 'during') {
const dateFilter = generateDetailedDateFilter(df as DuringFilter);
Expand Down

0 comments on commit bead5ad

Please sign in to comment.