diff options
author | eug-vs <eug-vs@keemail.me> | 2021-03-20 17:52:29 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-03-20 17:52:29 +0300 |
commit | 5f1bf64ed38fdda9143b75f0ab847eebe55eaaaa (patch) | |
tree | 92ca75a3eb1df3b753566dc6ca148360d6e0d06b /src/containers/TransferForm.tsx | |
parent | 839c9ccc0e12b7d15611df72baf9acaea19e8480 (diff) | |
download | commercel-ui-5f1bf64ed38fdda9143b75f0ab847eebe55eaaaa.tar.gz |
feat: allow extending Services
Diffstat (limited to 'src/containers/TransferForm.tsx')
-rw-r--r-- | src/containers/TransferForm.tsx | 2 |
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"> |