Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
p3psi-boo committed Dec 26, 2024
1 parent 9172020 commit 5587e67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/routes/iknowwhatyoudownload/daily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ async function handler(ctx) {
$table.append('<h1>Table View</h1>');
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('"', ''));
Expand Down

0 comments on commit 5587e67

Please sign in to comment.