← back to Homesonspec
admin/ingestion: guard sparkline last-value (TS strict index)
c9a3fdf34000b48d8e0c3e2c72695739fd64f26b · 2026-07-28 09:00:53 -0700 · Steve Abrams
Files touched
M apps/admin/src/app/ingestion/IngestionLive.tsx
Diff
commit c9a3fdf34000b48d8e0c3e2c72695739fd64f26b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jul 28 09:00:53 2026 -0700
admin/ingestion: guard sparkline last-value (TS strict index)
---
apps/admin/src/app/ingestion/IngestionLive.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/admin/src/app/ingestion/IngestionLive.tsx b/apps/admin/src/app/ingestion/IngestionLive.tsx
index b4922c1..b616c11 100644
--- a/apps/admin/src/app/ingestion/IngestionLive.tsx
+++ b/apps/admin/src/app/ingestion/IngestionLive.tsx
@@ -30,7 +30,7 @@ function Spark({ data }: { data: number[] }) {
if (data.length < 2) return <div className="text-xs text-neutral-400">gathering trend…</div>;
const max = Math.max(...data, 1);
const pts = data.map((v, i) => `${(i / (data.length - 1)) * w},${h - (v / max) * (h - 4) - 2}`).join(" ");
- const last = data[data.length - 1];
+ const last = data[data.length - 1] ?? 0;
return (
<svg width={w} height={h} className="overflow-visible">
<polyline points={pts} fill="none" stroke="#0d9488" strokeWidth="2" strokeLinejoin="round" strokeLinecap="round" />
← 557ae65 admin/ingestion: live sparkline + new-vs-refreshed + error r
·
back to Homesonspec
·
feat: live V8 'engine room' dashboard (:9798) — pistons/cran 7080744 →