From 8c3adcdc944e104a480150526f82c7a1c5c99b14 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 13 Dec 2017 12:41:47 +0000 Subject: [PATCH] Don't save empty properties. --- src/ContactEdit.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ContactEdit.tsx b/src/ContactEdit.tsx index 0f7ee89..3f14862 100644 --- a/src/ContactEdit.tsx +++ b/src/ContactEdit.tsx @@ -233,6 +233,10 @@ class ContactEdit extends React.Component { function setProperties(name: string, source: ValueType[]) { comp.removeAllProperties(name); source.forEach((x) => { + if (x.value === '') { + return; + } + let prop = new ICAL.Property(name, comp); prop.setParameter('type', x.type); prop.setValue(x.value);