We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8983211 commit 8b272b6Copy full SHA for 8b272b6
Leanplum-SDK/Classes/LeanplumRequest.m
@@ -745,7 +745,10 @@ + (NSUInteger)numResponsesInDictionary:(NSDictionary *)dictionary
745
746
+ (NSDictionary *)getResponseAt:(NSUInteger)index fromDictionary:(NSDictionary *)dictionary
747
{
748
- return [dictionary[@"response"] objectAtIndex:index];
+ if (index < [LPResponse numResponsesInDictionary:dictionary]) {
749
+ return [dictionary[@"response"] objectAtIndex:index];
750
+ }
751
+ return [dictionary[@"response"] lastObject];
752
}
753
754
+ (NSDictionary *)getLastResponse:(NSDictionary *)dictionary
0 commit comments