瀏覽代碼

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 2 年之前
父節點
當前提交
59d6db3953
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
 				}
 			])