fix: render weekData error

This commit is contained in:
hawtimzhang 2022-05-02 11:27:08 +08:00
parent 107bf53a39
commit 4613feff18
3 changed files with 17 additions and 12 deletions

View file

@ -267,7 +267,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);
@ -292,7 +292,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 [];