Fix minimum marker for zero forecast values (#30892)

This commit is contained in:
kay 2026-06-16 11:28:37 +02:00 • committed by GitHub
parent 5304d98a8c
commit e02106130e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,7 +194,7 @@ export function filterForecastSlots(
}
export function minSlotIndex(slots: ForecastSlot[]): number {
return slots.reduce((min, s, i) => (s.value < (slots[min]?.value || Infinity) ? i : min), 0);
return slots.reduce((min, s, i) => (s.value < (slots[min]?.value ?? Infinity) ? i : min), 0);
}
export function maxSlotIndex(slots: ForecastSlot[]): number {