Skip to content

Commit

Permalink
✨ feat(values): priorities values over defaultvalues (react-hook-form…
Browse files Browse the repository at this point in the history
  • Loading branch information
Moshyfawn authored and rafaelcalhau committed May 5, 2024
1 parent d450591 commit 88d4f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logic/createFormControl.ts
Expand Up @@ -117,8 +117,8 @@ export function createFormControl<
};
let _fields: FieldRefs = {};
let _defaultValues =
isObject(_options.defaultValues) || isObject(_options.values)
? cloneObject(_options.defaultValues || _options.values) || {}
isObject(_options.values) || isObject(_options.defaultValues)
? cloneObject(_options.values || _options.defaultValues) || {}
: {};
let _formValues = _options.shouldUnregister
? {}
Expand Down

0 comments on commit 88d4f6c

Please sign in to comment.