Skip to content

Commit

Permalink
Add lyric whitespace check
Browse files Browse the repository at this point in the history
  • Loading branch information
YUCLing committed Feb 28, 2021
1 parent c42926e commit 8641a32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typescript/lyric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function findLrcPos(lrc: Array<LyricLine>, time: number, offset = 0): number {
}

function setElText(el: HTMLElement, text: string) {
if (text == "") {
if (text == "" || !text.replace(/\s/g, '').length) {
el.innerHTML = "&nbsp;";
} else {
el.textContent = text;
Expand Down

0 comments on commit 8641a32

Please sign in to comment.