diff --git a/packages/react-native/Libraries/Network/RCTNetworking.mm b/packages/react-native/Libraries/Network/RCTNetworking.mm index 86e80e24cde6..e3baba2f529d 100644 --- a/packages/react-native/Libraries/Network/RCTNetworking.mm +++ b/packages/react-native/Libraries/Network/RCTNetworking.mm @@ -319,7 +319,7 @@ - (RCTURLRequestCancellationBlock)buildRequest:(NSDictionary *)q request.HTTPMethod = [RCTConvert NSString:RCTNilIfNull(query[@"method"])].uppercaseString ?: @"GET"; request.HTTPShouldHandleCookies = [RCTConvert BOOL:query[@"withCredentials"]]; - if (request.HTTPShouldHandleCookies == YES) { + if (request.HTTPShouldHandleCookies) { // Load and set the cookie header. NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:URL]; request.allHTTPHeaderFields = [NSHTTPCookie requestHeaderFieldsWithCookies:cookies];