fixed:TypeError: Cannot read properties of null (reading 'large')

This commit is contained in:
djteang 2025-09-25 10:01:46 +08:00
parent 49d1d3b8b8
commit 7357131005
1 changed files with 6 additions and 5 deletions

View File

@ -298,11 +298,12 @@ function DoubanPageClient() {
id: item.id?.toString() || '', id: item.id?.toString() || '',
title: item.name_cn || item.name, title: item.name_cn || item.name,
poster: poster:
item.images.large || item.images?.large ||
item.images.common || item.images?.common ||
item.images.medium || item.images?.medium ||
item.images.small || item.images?.small ||
item.images.grid, item.images?.grid ||
'', // 空字符串,让 VideoCard 组件处理图片加载失败
rate: item.rating?.score?.toFixed(1) || '', rate: item.rating?.score?.toFixed(1) || '',
year: item.air_date?.split('-')?.[0] || '', year: item.air_date?.split('-')?.[0] || '',
})), })),