Fix potential null reference in album cover URL fetching
This commit is contained in:
parent
151add9854
commit
e0516864ed
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ export default class {
|
|||
],
|
||||
}
|
||||
|
||||
const albumArtReq = await fetch(`https://resources.tidal.com/images/${album.cover.replaceAll("-", "/")}/1280x1280.jpg`)
|
||||
const albumArtReq = await fetch(`https://resources.tidal.com/images/${album?.cover.replaceAll("-", "/") || ""}/1280x1280.jpg`)
|
||||
const albumArt = albumArtReq.ok ? await albumArtReq.arrayBuffer() : new ArrayBuffer(0);
|
||||
|
||||
return FlacStreamTagger.fromBuffer(Buffer.from(Buffer.isBuffer(audioBuffer) ? audioBuffer : Buffer.from(audioBuffer)), {
|
||||
|
|
Loading…
Add table
Reference in a new issue