]> source.dussan.org Git - nextcloud-server.git/commitdiff
Parses malformed N fields a bit more tolerantly. Thanks to nibbler for the patch :-)
authorThomas Tanghus <thomas@tanghus.net>
Fri, 9 Mar 2012 06:36:05 +0000 (07:36 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Fri, 9 Mar 2012 06:39:35 +0000 (07:39 +0100)
apps/contacts/js/contacts.js

index 94876f5cd0906693d84381aebf596afef129c093..4ede2ff433643cf54b6dc9badd5361f4ae518d89 100644 (file)
@@ -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 + ' ';
                                }