Browse Source

fix(useForm): originalValue was sometimes set to a reference of input.value rather than a copy of input.value, leading to issues with arrays

Kristian Vos 1 year ago
parent
commit
59d6db3953
1 changed files with 1 additions and 1 deletions
  1. 1 1
      frontend/src/composables/useForm.ts

+ 1 - 1
frontend/src/composables/useForm.ts

@@ -96,7 +96,7 @@ export const useForm = (
 				name,
 				{
 					...input,
-					originalValue: input.value,
+					originalValue: JSON.parse(JSON.stringify(input.value)),
 					sourceChanged: false
 				}
 			])