From ce9b087190d5dda41de5c9ccd22054713e5ffbf0 Mon Sep 17 00:00:00 2001 From: junlu592 Date: Wed, 10 Dec 2025 12:52:56 +0100 Subject: [PATCH] corrections from ninja check --- ts/routes/graphs/reviews.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ts/routes/graphs/reviews.ts b/ts/routes/graphs/reviews.ts index f40b532e4..df1c03759 100644 --- a/ts/routes/graphs/reviews.ts +++ b/ts/routes/graphs/reviews.ts @@ -134,12 +134,11 @@ export function renderReviews( const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount; // Create bins using the thresholds: each bin contains data points between consecutive thresholds - let bins = bin() + const bins = bin() .value((m) => m[0]) // Extract the day number from each map entry [day, data] .domain(x.domain() as any) // Bins are constrained to this domain [xMin, xMax] .thresholds(thresholds)(sourceMap.entries() as any); // Use computed thresholds to split data into bins - // empty graph? const totalDays = sum(bins, (bin) => bin.length); if (!totalDays) {