chore(charts): correct the sleep series clamp comment

The comment said the series route caps sleep at 365 days; the route
accepts up to 3650, which is what the "All" tab asks for and what the
clamp below applies.
This commit is contained in:
Marc-André Bombeck committed 2026-11-11 22:15:31 +01:00
1 parent 2284040c6e
commit 3b3adc3aed
1 file changed
+2 -2
@@ -73,8 +73,8 @@ async function readDailySeries({
async function fetchSleepNights() {
const sleepParams = new URLSearchParams();
sleepParams.set("kind", "sleep");
// The series route caps sleep at 365 days; clamp the request so a
// longer comparison window still resolves.
// The series route caps `days` at 3650 (the "All" tab); clamp the
// request so a window stretched by a comparison shift still resolves.
sleepParams.set(
"days",
String(Math.max(1, Math.min(3650, Math.ceil(fetchWindow.windowDays)))),