Fix sorting of contacts with nil values

This commit is contained in:
Francis Lachapelle
2018-05-16 10:10:43 -04:00
parent d1a4a0d152
commit 3cadcaf4eb
+5
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];
}