Skip to content

Commit d31205c

Browse files
committed
update nullability of an existing dictionary
* Now that the OneSignalClientError type contains a nullable responseHeaders property, there is no need to default a null dictionary to be an empty dictionary * This default was recently added to prevent a crash that is no longer an issue after these changes.
1 parent a2c011f commit d31205c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

iOS_SDK/OneSignalSDK/OneSignalCore/Source/API/OneSignalClient.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ - (void)handleJSONNSURLResponse:(NSURLResponse*)response data:(NSData*)data erro
197197

198198
NSHTTPURLResponse* HTTPResponse = (NSHTTPURLResponse*)response;
199199
NSInteger statusCode = [HTTPResponse statusCode];
200-
NSDictionary *headers = [HTTPResponse allHeaderFields] ?: @{};
200+
NSDictionary *headers = [HTTPResponse allHeaderFields]; // can be null
201201
NSError* jsonError = nil;
202202
NSMutableDictionary* innerJson;
203203

0 commit comments

Comments
 (0)