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