From 65f8e9018a87556fe38df435378427b8ba771420 Mon Sep 17 00:00:00 2001 From: xdavidwu Date: Mon, 21 Jan 2019 20:10:22 +0800 Subject: [PATCH] SongSelect: compare id before clearing currentSongCache Add id check to currentSongCache clearing. Fixes subtitle rendering if title matches but not the same song. Titles are not guaranteed to be unique, but ids are. Title check is still here for tiles that are not songs. --- public/src/js/songselect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index a9aeacf..c011a63 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -1089,7 +1089,8 @@ class SongSelect{ highlight = 0 } - if(this.currentSongTitle !== currentSong.title){ + if(this.currentSongId !== currentSong.id || this.currentSongTitle !== currentSong.title){ + this.currentSongId = currentSong.id this.currentSongTitle = currentSong.title this.currentSongCache.clear() }