From c709b9c04b822cbff3a2f9af1010c43ac2aed10b Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 25 Oct 2016 09:27:57 -0400 Subject: [PATCH] (js) Fix initialization of a new Card's note --- UI/WebServerResources/js/Contacts/Card.service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UI/WebServerResources/js/Contacts/Card.service.js b/UI/WebServerResources/js/Contacts/Card.service.js index 6db51ebc8..b519e5120 100644 --- a/UI/WebServerResources/js/Contacts/Card.service.js +++ b/UI/WebServerResources/js/Contacts/Card.service.js @@ -154,9 +154,9 @@ }); if (this.isgroup) this.c_component = 'vlist'; - if (this.notes && this.notes.length) - this.notes = _.map(this.notes, function(note) { return { 'value': note }; }); - else + if (data.notes && data.notes.length) + this.notes = _.map(data.notes, function(note) { return { 'value': note }; }); + else if (!this.notes) this.notes = [ { value: '' } ]; // Instanciate Card objects for list members angular.forEach(this.refs, function(o, i) {