From 3101858eed04e08d23082778774ced97f5ad0c55 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Tue, 12 Dec 2023 19:17:32 +0100 Subject: [PATCH] check for undefined values when normalizing form new client data --- pages/clients.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/clients.vue b/pages/clients.vue index 83de69b..d462765 100644 --- a/pages/clients.vue +++ b/pages/clients.vue @@ -84,7 +84,7 @@ const formData = ref({ function normalizeForm() { for (const i in formData.value) - formData.value[i] = formData.value[i] === "" ? null : formData.value[i]; + formData.value[i] = formData.value[i] === "" || formData.value[i] === undefined ? null : formData.value[i]; } async function handleSubmit() {