Skip to content

Commit

Permalink
Do proper null/undefined chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov committed Dec 6, 2024
1 parent 19e3606 commit d6342e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/content/github/pr/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ async function execute() {

const coverageReport = await getPRReport(urlMetadata);
if (
!coverageReport.files ||
!coverageReport.totals.base.coverage ||
!coverageReport.totals.head.coverage ||
!coverageReport.totals.patch.coverage
!coverageReport?.files ||
!coverageReport?.totals?.base?.coverage ||
!coverageReport?.totals?.head?.coverage ||
!coverageReport?.totals?.patch?.coverage
) {
showError();
return;
Expand Down

0 comments on commit d6342e5

Please sign in to comment.