From bc5d9f58684acad4602bc7d43170b040a15f6dd5 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus <thomas@tanghus.net> Date: Fri, 9 Mar 2012 07:36:05 +0100 Subject: [PATCH] Parses malformed N fields a bit more tolerantly. Thanks to nibbler for the patch :-) --- apps/contacts/js/contacts.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 94876f5cd0..4ede2ff433 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -424,11 +424,11 @@ Contacts={ } else { narray = this.data.N[0]['value']; } - this.famname = narray[0]; - this.givname = narray[1]; - this.addname = narray[2]; - this.honpre = narray[3]; - this.honsuf = narray[4]; + this.famname = narray[0] || ''; + this.givname = narray[1] || ''; + this.addname = narray[2] || ''; + this.honpre = narray[3] || ''; + this.honsuf = narray[4] || ''; if(this.honpre.length > 0) { this.fullname += this.honpre + ' '; } -- GitLab