File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,20 +372,21 @@ function HomeClient() {
372372
373373 return todayAnimes . map ( ( anime , index ) => (
374374 < div
375- key = { `${ anime . id } -${ index } ` }
375+ key = { `${ anime . id || 0 } -${ index } ` }
376376 className = 'min-w-[96px] w-24 sm:min-w-[180px] sm:w-44'
377377 >
378378 < VideoCard
379379 from = 'douban'
380- title = { anime . name_cn || anime . name }
380+ title = { anime . name_cn || anime . name || '未知标题' }
381381 poster = {
382- anime . images . large ||
383- anime . images . common ||
384- anime . images . medium ||
385- anime . images . small ||
386- anime . images . grid
382+ anime . images ?. large ||
383+ anime . images ?. common ||
384+ anime . images ?. medium ||
385+ anime . images ?. small ||
386+ anime . images ?. grid ||
387+ '' // 空字符串,让 VideoCard 组件处理图片加载失败
387388 }
388- douban_id = { anime . id }
389+ douban_id = { anime . id || 0 }
389390 rate = { anime . rating ?. score ?. toFixed ( 1 ) || '' }
390391 year = { anime . air_date ?. split ( '-' ) ?. [ 0 ] || '' }
391392 isBangumi = { true }
You can’t perform that action at this time.
0 commit comments