Skip to content

Commit

Permalink
Merge pull request #627 from hbztd/fix/field
Browse files Browse the repository at this point in the history
Fix/Field
  • Loading branch information
Pilotager authored Oct 27, 2023
2 parents 6a60c71 + ee03017 commit 9c66688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/form/use-form-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function useFormField(name?: string, field?: FormItemInstance) {
useEffect(() => {
form?.linkField?.(name, field, inFormList)
return () => {
form.unlinkField(name, inFormList)
form?.unlinkField(name, inFormList)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [name, field, inFormList])
Expand Down

0 comments on commit 9c66688

Please sign in to comment.