Merge pull request #1598 from hawtim/fix-history-list-error

fix: render weekData error
This commit is contained in:
Hawtim 2022-05-02 14:44:48 +08:00 committed by GitHub
commit 9e787bab03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 12 deletions

View file

@ -269,7 +269,7 @@ export default {
// Pick 3 or fewer lyrics based on the lyric lines.
const lyricsToPick = Math.min(lyricLine.length, 3);
// The upperbound of the lyric line to pick
// The upperBound of the lyric line to pick
const randomUpperBound = lyricLine.length - lyricsToPick;
const startLyricLineIndex = randomNum(0, randomUpperBound - 1);
@ -294,7 +294,8 @@ export default {
playHistoryList() {
if (this.show && this.playHistoryMode === 'week') {
return this.liked.playHistory.weekData;
} else if (this.show && this.playHistoryMode === 'all') {
}
if (this.show && this.playHistoryMode === 'all') {
return this.liked.playHistory.allData;
}
return [];