From dd52dc0157a2f98c4aa5e07be26231b83e599bdc Mon Sep 17 00:00:00 2001 From: mbthiery Date: Wed, 25 Oct 2023 09:47:52 -0400 Subject: [PATCH] Fix hnt emissions graph edge case --- src/app/stats/components/HntEmissions.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/stats/components/HntEmissions.tsx b/src/app/stats/components/HntEmissions.tsx index da52fb1..d37dd23 100644 --- a/src/app/stats/components/HntEmissions.tsx +++ b/src/app/stats/components/HntEmissions.tsx @@ -34,6 +34,12 @@ export const HntEmissions = async () => { const hntEmissionsRows = Object.keys(hntEmissionsData) .map((date) => hntEmissionsData[date]) .reverse() + /* + Sometimes one query will run before emissions are actually emitted causing + non-complete rows. Filtering these rows out. When this happens we'll have 28 + instead of 30. + */ + .filter((row) => !!row.iot && !!row.mobile && !!row.total) return (