Skip to content

Commit

Permalink
Merge pull request #79 from oblador/patch-1
Browse files Browse the repository at this point in the history
Fix code passing in recordError
  • Loading branch information
corymsmith authored Nov 10, 2016
2 parents 54b1eaa + 6987ffe commit 6315312
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ios/SMXCrashlytics/SMXCrashlytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ - (dispatch_queue_t)methodQueue
{
NSInteger *code;
NSString *domain;
if ([error objectForKey:@"code"])
code = [error[@"code"] intValue];
NSObject *codeObject = [error objectForKey:@"code"];
if (codeObject && [codeObject isKindOfClass:NSNumber.class])
code = [(NSNumber *)codeObject intValue];
else
code = DefaultCode;
if ([error objectForKey:@"domain"])
Expand Down

0 comments on commit 6315312

Please sign in to comment.