Fix sorting of contacts with nil values

pull/241/head
Francis Lachapelle 2018-05-16 10:10:43 -04:00
parent d1a4a0d152
commit 3cadcaf4eb
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@
firstObject = [self count] > 0 ? [self objectAtIndex: 0] : nil;
otherFirstObject = [otherRecord count] > 0 ? [otherRecord objectAtIndex: 0] : nil;
if (firstObject == nil)
return NSOrderedAscending;
else if (otherFirstObject == nil)
return NSOrderedDescending;
return [firstObject compareCaseInsensitiveAscending: otherFirstObject];
}