fix: TypeScript null safety fixes for strict mode

- RateAnalysis: null guard on price_incl in timeline trace
- Layout: explicit null check on alertCount, use ?? for user.name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-05 12:18:38 +00:00
parent ebbffa3137
commit 8948d3abf6
2 changed files with 3 additions and 3 deletions

View file

@ -354,7 +354,7 @@ function buildTimelineTraces(entries: TimelineEntry[]) {
mode: 'lines+markers' as const,
name: room,
x: pts.map(p => p.scraped_at),
y: pts.map(p => p.price_incl),
y: pts.map(p => p.price_incl ?? null),
line: { color: colors[i % colors.length], width: 2 },
marker: { size: 5, color: colors[i % colors.length] },
hovertemplate: `${room}: £%{y:.2f}<extra></extra>`,