Skip to content

Commit

Permalink
Stop spamming errors at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed Mar 8, 2024
1 parent 1e9c6ce commit 30f2846
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Credits.astro
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ const bottomBorder = "-".repeat(50);
if (previousLineDone && elasped >= expectedTime) {
const credit = credits[creditIndex];

if (credit === undefined) {
return;
}

drawLine(credit, (elasped - expectedTime) / credit.length).then(
() => {
previousLineDone = true;
Expand Down Expand Up @@ -255,6 +259,10 @@ const bottomBorder = "-".repeat(50);
if (previousLineDone && elasped >= expectedTime) {
const lyric = lyrics[lyricIndex];

if (lyric === undefined) {
return;
}

if (lyric.asciiArt !== undefined) {
asciiArtDiv.innerText = ASCII_ART[lyric.asciiArt];
}
Expand Down

0 comments on commit 30f2846

Please sign in to comment.