Skip to content

Commit

Permalink
NSArray+SafeAccess fix
Browse files Browse the repository at this point in the history
runlin authored and runlin committed Apr 6, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 91eeb43 commit 0ccb4f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Categories/Foundation/NSArray/NSArray+SafeAccess.m
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@ -(id)objectWithIndex:(NSUInteger)index{
- (NSString*)stringWithIndex:(NSUInteger)index
{
id value = [self objectWithIndex:index];
if (value == nil || value == [NSNull null])
if (value == nil || value == [NSNull null] || [[value description] isEqualToString:@"<null>"])
{
return @"";
return nil;
}
if ([value isKindOfClass:[NSString class]]) {
return (NSString*)value;

0 comments on commit 0ccb4f3

Please sign in to comment.