Skip to content

Commit

Permalink
fixed exception when an array contains null
Browse files Browse the repository at this point in the history
  • Loading branch information
choreo committed Jan 28, 2015
1 parent b9930e9 commit 4e9901c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion KeyValueObjectMapping/DCKeyValueObjectMapping.m
Expand Up @@ -58,7 +58,10 @@ - (NSArray *)parseArray:(NSArray *)array forParentObject:(id)parentObject {
return nil;
}
NSMutableArray *values = [[NSMutableArray alloc] initWithCapacity:[array count]];
for (NSDictionary *dictionary in array) {
for (id dictionary in array) {
if ([dictionary isKindOfClass:[NSNull class]]) {
continue;
}
id value = [self parseDictionary:dictionary forParentObject:parentObject];
[values addObject:value];
}
Expand Down

0 comments on commit 4e9901c

Please sign in to comment.