Skip to content

Commit

Permalink
fix(action): Inbox data returns string when payload is string (#82) L…
Browse files Browse the repository at this point in the history
…P-6234
  • Loading branch information
alexisoyama committed Oct 3, 2017
1 parent 9bdd9c4 commit d0518f1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Leanplum-SDK/Classes/Leanplum.m
Expand Up @@ -3523,7 +3523,17 @@ - (NSDictionary *)dictionaryNamed:(NSString *)name
[Leanplum throwError:@"[LPActionContext dictionaryNamed:] Empty name parameter provided."];
return nil;
}
return (NSDictionary *) [self objectNamed:name];
LP_TRY
id object = [self objectNamed:name];
if ([object isKindOfClass:[NSDictionary class]]) {
return (NSDictionary *) object;
}

if ([object isKindOfClass:[NSString class]]) {
return [LPJSON JSONFromString:object];
}
LP_END_TRY
return nil;
}

- (NSArray *)arrayNamed:(NSString *)name
Expand Down

0 comments on commit d0518f1

Please sign in to comment.