避免列表还未生成

This commit is contained in:
2023-10-31 15:57:58 +08:00
parent 662db2a75b
commit 6c30ebfc5d
4 changed files with 53 additions and 1 deletions

View File

@@ -142,8 +142,9 @@ const musicList = new MusicList({
}
})
const client = clientList.clientlist.find(client => {
return client.musicList.find(x => x.id === item.id)
return client.musicList?.find(x => x.id === item.id)
})
if (!client) return console.error('未找到拥有此音乐的用户')
console.info('向', client.name, '请求音乐数据')
const c = Math.ceil(item.size / CHUNK_SIZE)