Skip to content

Commit

Permalink
✨ feat(values): priorities values over defaultvalues (#11399)
Browse files Browse the repository at this point in the history
Closes: #11398
  • Loading branch information
Moshyfawn committed Jan 15, 2024
1 parent 4e6fccb commit a0583ff
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 a0583ff

Please sign in to comment.