summaryrefslogtreecommitdiff
path: root/src/containers/TransferForm.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/TransferForm.tsx')
-rw-r--r--src/containers/TransferForm.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/containers/TransferForm.tsx b/src/containers/TransferForm.tsx
index afb2dff..801150e 100644
--- a/src/containers/TransferForm.tsx
+++ b/src/containers/TransferForm.tsx
@@ -13,7 +13,7 @@ const TransferForm: React.FC<FormikProps> = ({ setFieldValue, values }) => {
const { data: contractors } = hooks.contractors.useList();
if (!values.date) setFieldValue('date', moment().format('YYYY-MM-DD'));
- if (!values.contractorId && contractors) setFieldValue('contractorId', contractors[0]._id);
+ if (!values.contractorId && contractors?.length) setFieldValue('contractorId', contractors[0]._id);
return (
<Form id="form">