Handle contacts with null for a uid.
It seems like we aren't setting a uid for contacts without one when importing so it's possible to get ones without a uid. Opened ticket #71 to track this issue.master
parent
e54e24d8c1
commit
b54f25eee9
|
@ -29,6 +29,12 @@ function getContactColor(contact: ContactType) {
|
|||
colors.deepOrange[500],
|
||||
];
|
||||
|
||||
if (!contact.uid) {
|
||||
console.error(`Contact uid is null for contact ${contact.fn}`);
|
||||
console.error(contact.toIcal());
|
||||
return colorOptions[0];
|
||||
}
|
||||
|
||||
let sum = 0;
|
||||
const uid = contact.uid;
|
||||
for (let i = 0 ; i < uid.length ; i++) {
|
||||
|
|
Loading…
Reference in New Issue