Skip to content

Commit

Permalink
fix: weibo livephoto get wrong object key (#17985)
Browse files Browse the repository at this point in the history
  • Loading branch information
unliar authored Dec 26, 2024
1 parent d13f043 commit 8cd5311
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/routes/weibo/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ const weiboUtils = {
}

// drop live photo
const livePhotoCount = status.pics ? status.pics.filter((pic) => pic.type === 'livephotos').length : 0;
const pics = status.pics && status.pics.filter((pic) => pic.type !== 'livephotos');
const livePhotoCount = status.pics ? status.pics.filter((pic) => pic.type === 'livephoto').length : 0;
const pics = status.pics && status.pics.filter((pic) => pic.type !== 'livephoto');

// 添加微博配图
if (pics) {
Expand Down Expand Up @@ -263,7 +263,7 @@ const weiboUtils = {
},
formatVideo: (itemDesc, status) => {
const pageInfo = status.page_info;
const livePhotos = status.pics && status.pics.filter((pic) => pic.type === 'livephotos' && pic.videoSrc);
const livePhotos = status.pics && status.pics.filter((pic) => pic.type === 'livephoto' && pic.videoSrc);
let video = '<br clear="both" /><div style="clear: both"></div>';
let anyVideo = false;
if (livePhotos) {
Expand Down

0 comments on commit 8cd5311

Please sign in to comment.