Skip to content

Commit

Permalink
fix(core): ensure to clone user passed values in setters
Browse files Browse the repository at this point in the history
this fix is referenced from logaretm/vee-validate#3428
  • Loading branch information
Mini-ghost committed May 14, 2022
1 parent c629b3a commit f80f3d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/composable/useForm.ts
Expand Up @@ -111,7 +111,7 @@ function reducer<Values extends FormValues>(
state.isSubmitting.value = false;
return;
case ACTION_TYPE.SET_FIELD_VALUE:
set(state.values, message.payload.path, message.payload.value);
set(state.values, message.payload.path, deepClone(message.payload.value));
return;
case ACTION_TYPE.SET_TOUCHED:
set(state.touched.value, message.payload.path, message.payload.touched);
Expand Down

0 comments on commit f80f3d1

Please sign in to comment.