Skip to content

Commit

Permalink
优化迁移
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Jan 2, 2023
1 parent 5009494 commit 7e94e96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/utils/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ interface OldUserListInfo {
const filterMusicList = <T extends LX.Music.MusicInfo>(list: T[]): T[] => {
const ids: Set<string> = new Set()
return list.filter(s => {
if (!s.id || ids.has(s.id) || !s.name || s.singer == null) return false
if (!s.id || ids.has(s.id) || !s.name) return false
if (s.singer == null) s.singer = ''
ids.add(s.id)
return true
})
Expand Down

0 comments on commit 7e94e96

Please sign in to comment.