fixed: 直播将空数据导致异常

This commit is contained in:
LittleBoy 2025-02-09 14:56:31 +08:00
parent 098791edf4
commit e1779d7923
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ img {
--navigation-width: 200px;
}
.container {
max-width: 98%;
max-width: 90%;
padding: 20px 0;
}

View File

@ -207,7 +207,7 @@ export default function LiveIndex() {
}, [checkedIdArray, state.activeIndex])
const currentSelectedVideoIds = useMemo(()=>{
const activeId = videoData[state.activeIndex].id;
const activeId = videoData[state.activeIndex]?.id || -1;
return checkedIdArray.length == 0 ? [] : checkedIdArray.filter(id => id != activeId)
},[checkedIdArray,state.activeIndex])