From cd2565d5e7f792d7e2e1c67a1f59c3dce24ec47f Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Thu, 31 Mar 2022 11:51:21 +0300 Subject: [PATCH] fix error when sample on edit is empty --- src/components/@shared/FormFields/FilesInput/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/@shared/FormFields/FilesInput/index.tsx b/src/components/@shared/FormFields/FilesInput/index.tsx index 73d5057c4..6f0c97c56 100644 --- a/src/components/@shared/FormFields/FilesInput/index.tsx +++ b/src/components/@shared/FormFields/FilesInput/index.tsx @@ -65,7 +65,7 @@ export default function FilesInput(props: InputProps): ReactElement { return ( <> - {field.value[0].valid !== undefined ? ( + {field?.value && field?.value[0]?.valid !== undefined ? ( ) : (