Skip to content

Commit

Permalink
Try-catch fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jyuenbeep authored Nov 19, 2024
1 parent 9eea14c commit 98222b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const FileUpload: React.FC<FileUploadProps> = ({ uploadUrl }) => {
console.error("Upload failed:", error);
setError("An error occurred while uploading. Please try again.");
}
} else {
} catch (error) {
setError("Please select files to upload.");
}
};
Expand Down

0 comments on commit 98222b9

Please sign in to comment.