From 24e101f182067c588bd799f3c122bc045b9ce387 Mon Sep 17 00:00:00 2001 From: Viorel Cojocaru Date: Mon, 12 Aug 2024 18:21:48 +0200 Subject: [PATCH] fix(ui): ModuleInfo - handle missing baseline --- packages/ui/src/components/module-info/module-info.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/components/module-info/module-info.tsx b/packages/ui/src/components/module-info/module-info.tsx index 6f17be1d54..cf763e4777 100644 --- a/packages/ui/src/components/module-info/module-info.tsx +++ b/packages/ui/src/components/module-info/module-info.tsx @@ -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} /> )} @@ -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} /> );