From f12bc374f410e2406275d350cea6cf93192236e2 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 13 Dec 2017 15:23:37 +0000 Subject: [PATCH] ContactEdit: remove unset properties. --- src/ContactEdit.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ContactEdit.tsx b/src/ContactEdit.tsx index 5f04f03..25f1e40 100644 --- a/src/ContactEdit.tsx +++ b/src/ContactEdit.tsx @@ -283,7 +283,10 @@ class ContactEdit extends React.Component { ))); function setProperty(name: string, value: string) { - comp.updatePropertyWithValue(name, value); + comp.removeAllProperties(name); + if (value !== '') { + comp.updatePropertyWithValue(name, value); + } } setProperty('org', this.state.org);