Skip to content

Commit

Permalink
🐛 hotfix 尝试修复一个在获取不到视频评论或视频标签时程序终止的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cfdxkk committed Dec 31, 2023
1 parent 2038dab commit 360f3b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/video/kv[kvid].vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
if (videoData?.title && videoPartData?.link) {
videoSource.value = videoPartData.link;
videoDetails.value = {
videoPart: videoData.videoPart,
title: videoData.title,
videoTags: videoData.videoTags,
videoPart: videoData.videoPart ?? [],
title: videoData.title ?? "",
videoTags: videoData.videoTags ?? [],
uploaderInfo: videoData.uploaderInfo,
uploadDate: videoData.uploadDate,
videoId: kvid,
videoCategory: videoData.videoCategory,
videoCategory: videoData.videoCategory ?? "",
copyright: videoData.copyright,
image: videoData.image,
};
Expand Down Expand Up @@ -70,8 +70,8 @@
const getVideoCommentByKvidRequest: GetVideoCommentByKvidRequestDto = { videoId: kvid };
const videoCommentsResponse = await api.videoComment.getVideoCommentByKvid(getVideoCommentByKvidRequest);
if (videoCommentsResponse.success) {
comments.value = videoCommentsResponse.videoCommentList;
commentsCount.value = videoCommentsResponse.videoCommentCount;
comments.value = videoCommentsResponse.videoCommentList ?? [];
commentsCount.value = videoCommentsResponse.videoCommentCount ?? 0;
}
}
Expand Down

0 comments on commit 360f3b4

Please sign in to comment.