summaryrefslogtreecommitdiff
path: root/src/containers/TransferForm.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-20 17:52:29 +0300
committereug-vs <eug-vs@keemail.me>2021-03-20 17:52:29 +0300
commit5f1bf64ed38fdda9143b75f0ab847eebe55eaaaa (patch)
tree92ca75a3eb1df3b753566dc6ca148360d6e0d06b /src/containers/TransferForm.tsx
parent839c9ccc0e12b7d15611df72baf9acaea19e8480 (diff)
downloadcommercel-ui-5f1bf64ed38fdda9143b75f0ab847eebe55eaaaa.tar.gz
feat: allow extending Services
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">