From d6ac27c8da7012a12d6e937336960cf44ba22a9e Mon Sep 17 00:00:00 2001 From: Krzysztof Nofz Date: Fri, 7 Jul 2023 15:40:41 +0200 Subject: [PATCH] feature/SCIHUB-730 fixed typings --- src/lib/components/AddDocumentModal/hooks/useFileConvertion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/AddDocumentModal/hooks/useFileConvertion.tsx b/src/lib/components/AddDocumentModal/hooks/useFileConvertion.tsx index c46a557c..c6612c35 100644 --- a/src/lib/components/AddDocumentModal/hooks/useFileConvertion.tsx +++ b/src/lib/components/AddDocumentModal/hooks/useFileConvertion.tsx @@ -12,7 +12,7 @@ export const useFileConvertion = () => { const onFileConvert = async (files: FileList) => { const [file] = files; - if (!onFileValidation(file)) { + if (onFileValidation && !onFileValidation(file)) { return; }