multiple: check when var is possibly undefined

In cases where a field on an object might be undefined,
rather omit the value than set the field to undefined.
This commit is contained in:
Gianluca Zuccarelli 2024-11-29 14:02:23 +00:00 committed by Lucas Garfield
parent d4436dc6a9
commit 0d4bb26e0f
15 changed files with 82 additions and 60 deletions

View file

@ -142,7 +142,7 @@ const RegionsSelect = ({ composeId, handleClose }: RegionsSelectPropTypes) => {
const handleSubmit = async () => {
setIsSaving(true);
const requests = generateRequests(composeId, composeStatus, selected);
const requests = generateRequests(composeId, composeStatus!, selected);
await Promise.allSettled(requests.map((request) => cloneCompose(request)));
navigate(resolveRelPath(''));
};