Skip to content

Commit

Permalink
Merge pull request #12 from jt26077/master
Browse files Browse the repository at this point in the history
Fixing nil response object
  • Loading branch information
cnstoll committed May 23, 2013
2 parents 8c50a24 + b344fe1 commit 63f88d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/MMRecord/MMRecord.m
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@ + (NSArray *)parsingArrayFromResponseObject:(id)responseObject
recordResponseObject = [responseObject valueForKeyPath:keyPathForResponseObject];
}

if (recordResponseObject == nil || [recordResponseObject isKindOfClass:[NSNull class]]) {
recordResponseObject = [NSArray array];
}

if ([recordResponseObject isKindOfClass:[NSArray class]] == NO) {
recordResponseObject = [NSArray arrayWithObject:recordResponseObject];
}
Expand Down

0 comments on commit 63f88d0

Please sign in to comment.