Skip to content

Commit

Permalink
fix: show description
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 8, 2023
1 parent 4ca7901 commit 04ea0c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bilibili/fetchBilibiliSubtitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export async function fetchBilibiliSubtitle(
) {
const res = await fetchBilibiliSubtitleUrls(videoId);
const { title, desc, dynamic } = res || {};
const descriptionText = desc && dynamic ? `${desc} ${dynamic}` : undefined;
const hasDescription = desc || dynamic;
const descriptionText = hasDescription ? `${desc} ${dynamic}` : undefined;
const subtitleList = res?.subtitle?.list;
if (!subtitleList || subtitleList?.length < 1) {
return { title, subtitlesArray: null, descriptionText };
Expand Down

1 comment on commit 04ea0c6

@vercel
Copy link

@vercel vercel bot commented on 04ea0c6 Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.