From 35ec0d679fad4b3f431503483659f8ee2e231d6e Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Fri, 20 Sep 2024 15:17:54 +0100 Subject: [PATCH 1/2] patch --- utils/convertToChartData.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/convertToChartData.ts b/utils/convertToChartData.ts index e2f603e..2c22291 100644 --- a/utils/convertToChartData.ts +++ b/utils/convertToChartData.ts @@ -118,7 +118,10 @@ async function appendMissingDataSections( ); } catch {} let body = res.body ? JSON.parse(res.body) : []; - res = body && body.length ? body.documentedData?.data ?? body.data : []; + res = + body && body.documentedData.data.length + ? body.documentedData?.data ?? body.data + : []; if (nullsInApiData(res)) { await sendMessage( From 446ad52dc870e7d4b0070b709d81a7dd17a5506c Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Fri, 20 Sep 2024 15:18:56 +0100 Subject: [PATCH 2/2] patch --- utils/convertToChartData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/convertToChartData.ts b/utils/convertToChartData.ts index 2c22291..25943ef 100644 --- a/utils/convertToChartData.ts +++ b/utils/convertToChartData.ts @@ -119,7 +119,7 @@ async function appendMissingDataSections( } catch {} let body = res.body ? JSON.parse(res.body) : []; res = - body && body.documentedData.data.length + body && body.documentedData?.data.length ? body.documentedData?.data ?? body.data : [];