JS Ustaw wartość w obiekcie tylko wtedy, gdy zdefiniowano
const value = getValue()
const destination = {
...(value ? { value } : {})
}
Clean Caribou
const value = getValue()
const destination = {
...(value ? { value } : {})
}