collapse if/else
This commit is contained in:
parent
619dc642f5
commit
f6fde61a82
|
@ -30,11 +30,9 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue