修复潜在报错

pull/1066/head
lyswhut 2022-11-27 19:41:00 +08:00
parent f2b023193c
commit f80d03ed15
2 changed files with 8 additions and 8 deletions

View File

@ -48,9 +48,9 @@ export default {
if (item.pc) { if (item.pc) {
list.push({ list.push({
singer: item.pc.ar, singer: item.pc.ar ?? '',
name: item.pc.sn, name: item.pc.sn ?? '',
albumName: item.pc.alb, albumName: item.pc.alb ?? '',
albumId: item.al?.id, albumId: item.al?.id,
source: 'wy', source: 'wy',
interval: formatPlayTime(item.dt / 1000), interval: formatPlayTime(item.dt / 1000),
@ -65,7 +65,7 @@ export default {
} else { } else {
list.push({ list.push({
singer: this.getSinger(item.ar), singer: this.getSinger(item.ar),
name: item.name, name: item.name ?? '',
albumName: item.al?.name, albumName: item.al?.name,
albumId: item.al?.id, albumId: item.al?.id,
source: 'wy', source: 'wy',

View File

@ -175,9 +175,9 @@ export default {
if (item.pc) { if (item.pc) {
list.push({ list.push({
singer: item.pc.ar, singer: item.pc.ar ?? '',
name: item.pc.sn, name: item.pc.sn ?? '',
albumName: item.pc.alb, albumName: item.pc.alb ?? '',
albumId: item.al?.id, albumId: item.al?.id,
source: 'wy', source: 'wy',
interval: formatPlayTime(item.dt / 1000), interval: formatPlayTime(item.dt / 1000),
@ -192,7 +192,7 @@ export default {
} else { } else {
list.push({ list.push({
singer: this.getSinger(item.ar), singer: this.getSinger(item.ar),
name: item.name, name: item.name ?? '',
albumName: item.al?.name, albumName: item.al?.name,
albumId: item.al?.id, albumId: item.al?.id,
source: 'wy', source: 'wy',