check for undefined values when normalizing form new client data
This commit is contained in:
parent
f7519f32b3
commit
3101858eed
1 changed files with 1 additions and 1 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue