Skip to content

Commit 1bad468

Browse files
committed
fix: fix possible NPE
1 parent 5829c8d commit 1bad468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/song-info.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const handleData = async (
140140
}
141141

142142
const thumbnails = videoDetails.thumbnail?.thumbnails;
143-
songInfo.imageSrc = thumbnails.at(-1)?.url.split('?')[0];
143+
songInfo.imageSrc = thumbnails?.at(-1)?.url?.split('?')?.at(0);
144144

145145
if (
146146
songInfo.imageSrc &&

0 commit comments

Comments
 (0)