@@ -173,8 +173,8 @@ const SyncedLyricsPage = react.memo(({ lyrics = [], provider, copyright, isKara
173
173
const lineText = originalText && showTranslatedBelow ? originalText : text ;
174
174
175
175
// Convert lyrics to text for comparison
176
- const belowOrigin = typeof originalText === "object" ? originalText ?. props ?. children ?. [ 0 ] : originalText ;
177
- const belowTxt = typeof text === "object" ? text ?. props ?. children ?. [ 0 ] : text ;
176
+ const belowOrigin = ( typeof originalText === "object" ? originalText ?. props ?. children ?. [ 0 ] : originalText ) ?. replace ( / \s + / g , "" ) ;
177
+ const belowTxt = ( typeof text === "object" ? text ?. props ?. children ?. [ 0 ] : text ) ?. replace ( / \s + / g , "" ) ;
178
178
179
179
const belowMode = showTranslatedBelow && originalText && belowOrigin !== belowTxt ;
180
180
@@ -455,8 +455,8 @@ const SyncedExpandedLyricsPage = react.memo(({ lyrics, provider, copyright, isKa
455
455
const lineText = originalText && showTranslatedBelow ? originalText : text ;
456
456
457
457
// Convert lyrics to text for comparison
458
- const belowOrigin = typeof originalText === "object" ? originalText ?. props ?. children ?. [ 0 ] : originalText ;
459
- const belowTxt = typeof text === "object" ? text ?. props ?. children ?. [ 0 ] : text ;
458
+ const belowOrigin = ( typeof originalText === "object" ? originalText ?. props ?. children ?. [ 0 ] : originalText ) ?. replace ( / \s + / g , "" ) ;
459
+ const belowTxt = ( typeof text === "object" ? text ?. props ?. children ?. [ 0 ] : text ) ?. replace ( / \s + / g , "" ) ;
460
460
461
461
const belowMode = showTranslatedBelow && originalText && belowOrigin !== belowTxt ;
462
462
@@ -531,8 +531,8 @@ const UnsyncedLyricsPage = react.memo(({ lyrics, provider, copyright }) => {
531
531
const lineText = originalText && showTranslatedBelow ? originalText : text ;
532
532
533
533
// Convert lyrics to text for comparison
534
- const belowOrigin = typeof originalText === "object" ? originalText ?. props ?. children ?. [ 0 ] : originalText ;
535
- const belowTxt = typeof text === "object" ? text ?. props ?. children ?. [ 0 ] : text ;
534
+ const belowOrigin = ( typeof originalText === "object" ? originalText ?. props ?. children ?. [ 0 ] : originalText ) ?. replace ( / \s + / g , "" ) ;
535
+ const belowTxt = ( typeof text === "object" ? text ?. props ?. children ?. [ 0 ] : text ) ?. replace ( / \s + / g , "" ) ;
536
536
537
537
const belowMode = showTranslatedBelow && originalText && belowOrigin !== belowTxt ;
538
538
0 commit comments