Skip to content

Commit

Permalink
Solved File Management Exceptions (#7390)
Browse files Browse the repository at this point in the history
* File Management Exceptions Solved

* added return statement

* change request done

* change suggestion done

* done

* final commit
  • Loading branch information
manasvi-gaur authored Mar 19, 2024
1 parent 14a771d commit d866948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Patient/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,8 @@ export const FileUpload = (props: FileUploadProps) => {
}

const onFileChange = (e: ChangeEvent<HTMLInputElement>): any => {
if (e.target.files == null) {
throw new Error("Error finding e.target.files");
if (!e.target.files?.length) {
return;
}
const f = e.target.files[0];
const fileName = f.name;
Expand Down

0 comments on commit d866948

Please sign in to comment.