diff --git a/src/pages/Liquidated.tsx b/src/pages/Liquidated.tsx index 0b56e1f..99cca03 100644 --- a/src/pages/Liquidated.tsx +++ b/src/pages/Liquidated.tsx @@ -64,11 +64,14 @@ export function Liquidated() { const graphDataList = populateMissingDays(graphDataMap, GRAPH_DAYS); - const summedGraphDataList = graphDataList.map((item) => ({ - ...item, - active: sum(Object.values(item.active)), - liquidated: sum(Object.values(item.active)), - })); + const summedGraphDataList = graphDataList.map((item) => { + const total = item.active ? sum(Object.values(item.active)) : 0; + return { + ...item, + active: total, + liquidated: total, + }; + }); return ( <> @@ -77,7 +80,7 @@ export function Liquidated() { - {/* */} +