Selaa lähdekoodia

fix: lint errors

Sven 1 vuosi sitten
vanhempi
commit
d43221a1f7
2 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 3 0
      src/features/lyrics.ts
  2. 2 2
      src/features/songLists.ts

+ 3 - 0
src/features/lyrics.ts

@@ -190,6 +190,9 @@ export async function getCurrentLyricsUrl() {
       }
     }
 
+    if(!artistName)
+      return undefined;
+
     const url = await fetchLyricsUrl(sanitizeArtists(artistName), sanitizeSong(songName));
 
     if(url) {

+ 2 - 2
src/features/songLists.ts

@@ -115,8 +115,8 @@ async function addQueueButtons(
       e.preventDefault();
       e.stopImmediatePropagation();
 
-      let song: string | undefined,
-        artist: string | undefined;
+      let song: string | null | undefined,
+        artist: string | null | undefined;
 
       if(listType === "currentQueue") {
         const songInfo = queueItem.querySelector<HTMLElement>(".song-info");