Skip to content

Commit

Permalink
NSArray+SafeAccess fix
Browse files Browse the repository at this point in the history
  • Loading branch information
runlin authored and runlin committed Apr 6, 2016
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
Expand Up @@ -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;
Expand Down

0 comments on commit 0ccb4f3

Please sign in to comment.