Skip to content

Commit

Permalink
fix #11937 add validation in cleanup in useController
Browse files Browse the repository at this point in the history
  • Loading branch information
nakaakist committed May 25, 2024
1 parent b491b29 commit 2ec4eae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"files": [
{
"path": "./dist/index.cjs.js",
"maxSize": "10.1 kB"
"maxSize": "10.2 kB"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/useController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function useController<
const updateMounted = (name: InternalFieldName, value: boolean) => {
const field: Field = get(control._fields, name);

if (field) {
if (field?._f) {
field._f.mount = value;
}
};
Expand Down

0 comments on commit 2ec4eae

Please sign in to comment.