Skip to content

Commit

Permalink
Merge pull request #4635 from relative-ci/fix-module-info-missing-bas…
Browse files Browse the repository at this point in the history
…eline

fix(ui): ModuleInfo - handle missing baseline
  • Loading branch information
vio authored Aug 13, 2024
2 parents 286279d + 24e101f commit 5905255
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ui/src/components/module-info/module-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ const renderRunInfo = (item: ReportMetricRow) => {
title={ModuleSizeMetrics[ModuleSizeMetric.TOTAL_SIZE].label}
titleTooltip={ModuleSizeMetrics[ModuleSizeMetric.TOTAL_SIZE].tooltip}
current={currentRun.sizeTotal}
baseline={baselineRun.sizeTotal}
baseline={baselineRun?.sizeTotal || 0}
/>
<ModuleSizeRunInfo
metric={metric}
title={ModuleSizeMetrics[ModuleSizeMetric.DUPLICATE_SIZE].label}
titleTooltip={ModuleSizeMetrics[ModuleSizeMetric.DUPLICATE_SIZE].tooltip}
current={currentRun.sizeDuplicate}
baseline={baselineRun.sizeDuplicate}
baseline={baselineRun?.sizeDuplicate || 0}
/>
</>
)}
Expand All @@ -193,7 +193,7 @@ const renderRunInfo = (item: ReportMetricRow) => {
title={ModuleSizeMetrics[ModuleSizeMetric.SIZE].label}
titleTooltip={ModuleSizeMetrics[ModuleSizeMetric.SIZE].tooltip}
current={currentRun.size}
baseline={baselineRun.size}
baseline={baselineRun?.size || 0}
/>
</FlexStack>
);
Expand Down

0 comments on commit 5905255

Please sign in to comment.