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