Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation in the cleanup process in useController #11938

Merged
merged 2 commits into from
May 25, 2024

Conversation

nakaakist
Copy link
Contributor

@nakaakist nakaakist commented May 25, 2024

fixes #11937.

In some cases, in the updateMounted function, the field does not have an _f field even if the field is truthy.

This PR adds extra validation to cover such cases.

Also, increased the size limit from 10.1 kB to 10.2 kB as the size limit check failed.

Copy link

codesandbox bot commented May 25, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

src/useController.ts Outdated Show resolved Hide resolved
@bluebill1049 bluebill1049 merged commit aff0bb9 into react-hook-form:master May 25, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

issue: cleanup process in useController crashes when used with useFieldArray in certain cases
2 participants