fix: fix eslint errors and warnings

This commit is contained in:
Henry Li
2026-01-31 21:46:31 +08:00
parent 9c3b928f1d
commit 8ecb6b3d1d
5 changed files with 20 additions and 80 deletions

View File

@@ -51,8 +51,10 @@ export async function uploadFiles(
);
if (!response.ok) {
const error = await response.json().catch(() => ({ detail: "Upload failed" }));
throw new Error(error.detail || "Upload failed");
const error = await response
.json()
.catch(() => ({ detail: "Upload failed" }));
throw new Error(error.detail ?? "Upload failed");
}
return response.json();