diff --git a/src/components/analytics/heatmap.tsx b/src/components/analytics/heatmap.tsx index 531133c..44aa098 100644 --- a/src/components/analytics/heatmap.tsx +++ b/src/components/analytics/heatmap.tsx @@ -82,7 +82,7 @@ export function LotteryHeatmap() { setGeneratedSet([]) }, [lottoType, timeframe, activeGame.max]) - const maxFreq = Math.max(...numbers.map(n => n.frequency), 1) + const maxFreq = numbers.reduce((max, n) => Math.max(max, n.frequency), 1) const getTemperatureColor = (freq: number) => { const ratio = freq / maxFreq