mirror of
1
Fork 0

collapse if/else

This commit is contained in:
f0x 2023-01-18 13:40:04 +00:00
parent 619dc642f5
commit f6fde61a82
1 changed files with 2 additions and 4 deletions

View File

@ -30,10 +30,8 @@ function convertToForm(obj) {
formData.set(`${key}[${key2}]`, val2); formData.set(`${key}[${key2}]`, val2);
} }
}); });
} else { } else if (val != undefined) {
if (val != undefined) { formData.set(key, val);
formData.set(key, val);
}
} }
}); });
return formData; return formData;