From 80742fffdbadf8fd22b89229c8289a3be6020ff7 Mon Sep 17 00:00:00 2001 From: Jorge Vargas Date: Sun, 6 Apr 2025 19:23:34 -0600 Subject: [PATCH] Only handle cover on album edit when image is uploaded --- src/pages/api/album/edit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/album/edit.ts b/src/pages/api/album/edit.ts index 5927808..14fed7a 100644 --- a/src/pages/api/album/edit.ts +++ b/src/pages/api/album/edit.ts @@ -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) =>