diff --git a/src/main/features/core/lyrics/furigana.ts b/src/main/features/core/lyrics/furigana.ts index 1621f6245..aa089b204 100644 --- a/src/main/features/core/lyrics/furigana.ts +++ b/src/main/features/core/lyrics/furigana.ts @@ -42,13 +42,13 @@ export const convertFurigana = async (text: string): Promise => { export const convertRomaji = async (text: string): Promise => { const KuroshiroClass = (Kuroshiro as any).default || Kuroshiro; - if (!KuroshiroClass.Util.hasKana(text)) return text; + if (!KuroshiroClass.Util.hasKana(text)) return ''; try { const kuroshiro = await getKuroshiro(); return await kuroshiro.convert(text, { mode: 'spaced', to: 'romaji' }); } catch (e) { console.error('Romaji conversion error: ', e); - return text; + return ''; } }; diff --git a/src/renderer/features/lyrics/hooks/use-furigana-lyrics.ts b/src/renderer/features/lyrics/hooks/use-furigana-lyrics.ts index 04832fb26..6e0959d27 100644 --- a/src/renderer/features/lyrics/hooks/use-furigana-lyrics.ts +++ b/src/renderer/features/lyrics/hooks/use-furigana-lyrics.ts @@ -43,7 +43,7 @@ export const useRomajiLyrics = (lyrics: LyricsResponse | null | undefined, enabl const convertedLines = converted.split('\n'); return lyrics.map(([time], i) => [ time, - convertedLines[i] ?? lyrics[i][1], + convertedLines[i] ?? '', ]) as SynchronizedLyricsArray; } return lyrics;