diff --git a/src/helpers/utils.ts b/src/helpers/utils.ts index 31152eb..bd03269 100644 --- a/src/helpers/utils.ts +++ b/src/helpers/utils.ts @@ -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)), {