collapse if/else
This commit is contained in:
parent
619dc642f5
commit
f6fde61a82
|
@ -30,10 +30,8 @@ function convertToForm(obj) {
|
|||
formData.set(`${key}[${key2}]`, val2);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (val != undefined) {
|
||||
formData.set(key, val);
|
||||
}
|
||||
} else if (val != undefined) {
|
||||
formData.set(key, val);
|
||||
}
|
||||
});
|
||||
return formData;
|
||||
|
|
Loading…
Reference in New Issue