Skip to content

Commit

Permalink
fixed file type unsupported message not being displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Jun 13, 2024
1 parent 144da63 commit b3e6d6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/ImageUpload/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ const ImageUpload = ({ onImageUpload }) => {
setImages(uploadedImages);
onImageUpload(uploadedImages);
} catch (error) {
if (error?.data) {
showSnackbar(error.data.message, 'error');
const errorResponse = error?.response?.data
if (errorResponse) {
showSnackbar(errorResponse?.message, 'error');
}else {
showSnackbar(t("error.server_connection"), 'error')
}
Expand Down

0 comments on commit b3e6d6c

Please sign in to comment.