mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
add time validation to lyric seek (#1280)
This commit is contained in:
@@ -321,7 +321,11 @@ export const SynchronizedLyrics = ({
|
||||
fontSize={settings.fontSize}
|
||||
id={`lyric-${idx}`}
|
||||
key={idx}
|
||||
onClick={() => handleSeek(time / 1000)}
|
||||
onClick={() => {
|
||||
if (time > 0 && Number.isFinite(time)) {
|
||||
handleSeek(time / 1000);
|
||||
}
|
||||
}}
|
||||
text={
|
||||
text +
|
||||
(translatedLyrics ? `_BREAK_${translatedLyrics.split('\n')[idx]}` : '')
|
||||
|
||||
Reference in New Issue
Block a user