Fix error message on cancel

This commit is contained in:
Nicolas Mowen 2025-02-09 11:07:52 -07:00
parent b065d3c645
commit e3fa0862ca

View File

@ -41,7 +41,7 @@ export default function UploadImageDialog({
const onSubmit = useCallback(
(data: z.infer<typeof formSchema>) => {
if (!data["file"]) {
if (!data["file"] || Object.keys(data.file).length == 0) {
return;
}