diff --git a/src/pages/Playroom.vue b/src/pages/Playroom.vue index 19082bd..e61ff8c 100644 --- a/src/pages/Playroom.vue +++ b/src/pages/Playroom.vue @@ -302,6 +302,9 @@ function makePlayQueueListDismiss() { } function getCurrentTrack() { + if (playQueueStore.list.length === 0) { + return null + } if (playQueueStore.playMode.shuffle) { return playQueueStore.list[playQueueStore.shuffleList[playQueueStore.currentIndex]] } else { @@ -350,7 +353,9 @@ function toggleMoreOptions() { } } -watch(() => [preferences.presentLyrics, getCurrentTrack().song.lyricUrl], (newValue, oldValue) => { +watch(() => [preferences.presentLyrics, getCurrentTrack()?.song.lyricUrl], (newValue, oldValue) => { + if (!getCurrentTrack()) { return } + const [showLyrics, hasLyricUrl] = newValue const [prevShowLyrics, _prevHasLyricUrl] = oldValue || [false, null] @@ -436,319 +441,335 @@ watch(() => playQueueStore.currentIndex, () => {