Skip to content

Commit

Permalink
Fix: Add fallback to empty dictionary for HTTPResponse headers
Browse files Browse the repository at this point in the history
  • Loading branch information
jennantilla committed Nov 21, 2024
1 parent cd8e799 commit b8d6dcf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ - (void)handleJSONNSURLResponse:(NSURLResponse*)response data:(NSData*)data erro

NSHTTPURLResponse* HTTPResponse = (NSHTTPURLResponse*)response;
NSInteger statusCode = [HTTPResponse statusCode];
NSDictionary *headers = [HTTPResponse allHeaderFields];
NSDictionary *headers = [HTTPResponse allHeaderFields] ?: @{};
NSError* jsonError = nil;
NSMutableDictionary* innerJson;

Expand Down

0 comments on commit b8d6dcf

Please sign in to comment.