Skip to content

Commit

Permalink
defaults, not data
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Jan 9, 2025
1 parent 59ee7aa commit 759161a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue3/src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function useForm<TForm extends FormDataType>(
return this
},
reset(...fields) {
const resolvedData = typeof data === 'function' ? cloneDeep(data()) : cloneDeep(data)
const resolvedData = typeof data === 'function' ? cloneDeep(data()) : cloneDeep(defaults)
const clonedData = cloneDeep(resolvedData)
if (fields.length === 0) {
defaults = clonedData
Expand Down

0 comments on commit 759161a

Please sign in to comment.