Don't save empty properties.

master
Tom Hacohen 7 years ago
parent fec1edf711
commit 8c3adcdc94

@ -233,6 +233,10 @@ class ContactEdit extends React.Component {
function setProperties(name: string, source: ValueType[]) { function setProperties(name: string, source: ValueType[]) {
comp.removeAllProperties(name); comp.removeAllProperties(name);
source.forEach((x) => { source.forEach((x) => {
if (x.value === '') {
return;
}
let prop = new ICAL.Property(name, comp); let prop = new ICAL.Property(name, comp);
prop.setParameter('type', x.type); prop.setParameter('type', x.type);
prop.setValue(x.value); prop.setValue(x.value);

Loading…
Cancel
Save