From 5587e6716ae78e100ba3c9a143677fe1b597622e Mon Sep 17 00:00:00 2001 From: Bubu Date: Thu, 26 Dec 2024 14:05:34 +0800 Subject: [PATCH] 1 --- lib/routes/iknowwhatyoudownload/daily.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/iknowwhatyoudownload/daily.ts b/lib/routes/iknowwhatyoudownload/daily.ts index a70f5378398e05..dc66e5019ac350 100644 --- a/lib/routes/iknowwhatyoudownload/daily.ts +++ b/lib/routes/iknowwhatyoudownload/daily.ts @@ -60,7 +60,8 @@ async function handler(ctx) { $table.append('

Table View

'); const dataMatch = response.data.match(/data:\s*\[([\d",\s]+)\]/); const labelsMatch = response.data.match(/labels:\s*\[(.*?)\]/); - if (dataMatch && labelsMatch) { + + if (dataMatch?.[1] && labelsMatch?.[1]) { const result = {}; const dataList = dataMatch[1].split(',').map((s) => s.trim().replaceAll('"', ''));