Don't add an empty category to a contact

pull/91/head
Francis Lachapelle 2014-09-17 15:45:31 -04:00
parent c4802df024
commit 865bf096f5
1 changed files with 5 additions and 1 deletions

View File

@ -485,7 +485,11 @@ static Class SOGoContactGCSEntryK = Nil;
o = [values objectAtIndex: i];
if ([o isKindOfClass: [NSDictionary class]])
{
[categories addObject: [o objectForKey: @"value"]];
o = [o objectForKey: @"value"];
if (o && [o isKindOfClass: [NSString class]] && [(NSString *) o length] > 0)
{
[categories addObject: o];
}
}
}
[card setCategories: categories];