Skip to content

Commit

Permalink
fix(route): fix bilibili followings-dynamic parse error (#16935)
Browse files Browse the repository at this point in the history
  • Loading branch information
JimenezLi authored Sep 26, 2024
1 parent f3bdd7a commit b0eac49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/routes/bilibili/followings-dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ async function handler(ctx) {
data.map(async (item) => {
const parsed = JSONbig.parse(item.card);
const data = parsed.apiSeasonInfo || (getTitle(parsed.item) ? parsed.item : parsed);
const origin = parsed.origin ? JSONbig.parse(parsed.origin) : null;
// parsed.origin is already parsed, and it may be json or string.
// Don't parse it again, or it will cause an error.
const origin = parsed.origin || null;

// img
let imgHTML = '';
Expand Down

0 comments on commit b0eac49

Please sign in to comment.