check for undefined values when normalizing form new client data

This commit is contained in:
Wroclaw 2023-12-12 19:17:32 +01:00
parent f7519f32b3
commit 3101858eed

View file

@ -84,7 +84,7 @@ const formData = ref<any>({
function normalizeForm() { function normalizeForm() {
for (const i in formData.value) 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() { async function handleSubmit() {