summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-03-09 07:36:05 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-03-09 07:39:35 +0100
commitbc5d9f58684acad4602bc7d43170b040a15f6dd5 (patch)
treebf7223fa073cd6a248b005cf0d8a7c79c9310ce9 /apps
parent8495e1a63e20e9cae0f1c1835de558606d1ecfc4 (diff)
downloadnextcloud-server-bc5d9f58684acad4602bc7d43170b040a15f6dd5.tar.gz
nextcloud-server-bc5d9f58684acad4602bc7d43170b040a15f6dd5.zip
Parses malformed N fields a bit more tolerantly. Thanks to nibbler for the patch :-)
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/js/contacts.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 94876f5cd09..4ede2ff4336 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 + ' ';
}