Parses malformed N fields a bit more tolerantly. Thanks to nibbler for the patch :-)

This commit is contained in:
Thomas Tanghus 2012-03-09 07:36:05 +01:00
parent 8495e1a63e
commit bc5d9f5868
1 changed files with 5 additions and 5 deletions

View File

@ -424,11 +424,11 @@ Contacts={
} else { } else {
narray = this.data.N[0]['value']; narray = this.data.N[0]['value'];
} }
this.famname = narray[0]; this.famname = narray[0] || '';
this.givname = narray[1]; this.givname = narray[1] || '';
this.addname = narray[2]; this.addname = narray[2] || '';
this.honpre = narray[3]; this.honpre = narray[3] || '';
this.honsuf = narray[4]; this.honsuf = narray[4] || '';
if(this.honpre.length > 0) { if(this.honpre.length > 0) {
this.fullname += this.honpre + ' '; this.fullname += this.honpre + ' ';
} }