Only handle cover on album edit when image is uploaded

This commit is contained in:
Jorge Vargas 2025-04-06 19:23:34 -06:00
parent c7d9605d81
commit 80742fffdb

View file

@ -64,7 +64,7 @@ export const POST: APIRoute = async ({ request, locals }) => {
})
await Promise.all([
cover ? handleCover(cover, 'album', albumId, tx) : undefined,
cover && cover.size > 0 ? handleCover(cover, 'album', albumId, tx) : undefined,
downloads
? Promise.all(
downloads.map((d) =>