diff --git a/site/scripts/stats/fetch-api-stats.js b/site/scripts/stats/fetch-api-stats.js index 39bce7423..e21cac235 100644 --- a/site/scripts/stats/fetch-api-stats.js +++ b/site/scripts/stats/fetch-api-stats.js @@ -43,7 +43,10 @@ export const apiStats = async (start, end, interval) => { ) .filter((x) => !!x) .flatMap(({ results }, i) => - results.map(({ date, pageviews }) => ({ date, [names[i]]: pageviews })) + (results || []).map(({ date, pageviews }) => ({ + date, + [names[i]]: pageviews, + })) ) .reduce( (acc, el) => (