diff --git a/Libraries/Image/RCTImageLoader.mm b/Libraries/Image/RCTImageLoader.mm index 2aba728a52d..757b17f8d13 100644 --- a/Libraries/Image/RCTImageLoader.mm +++ b/Libraries/Image/RCTImageLoader.mm @@ -113,7 +113,6 @@ static uint64_t monotonicTimeGetCurrentNanoseconds(void) @synthesize maxConcurrentLoadingTasks = _maxConcurrentLoadingTasks; @synthesize maxConcurrentDecodingTasks = _maxConcurrentDecodingTasks; @synthesize maxConcurrentDecodingBytes = _maxConcurrentDecodingBytes; -@synthesize turboModuleRegistry = _turboModuleRegistry; RCT_EXPORT_MODULE() @@ -645,20 +644,14 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, progressBlock:(RCTImageLoaderProgressBlock)progressHandler completionBlock:(void (^)(NSError *error, id imageOrData, NSURLResponse *response))completionHandler { - // Check if networking module is available - if (RCT_DEBUG && ![_bridge respondsToSelector:@selector(networking)] - && ![_turboModuleRegistry moduleForName:"Networking"]) { + RCTNetworking *networking = [_moduleRegistry moduleForName:"Networking"]; + if (RCT_DEBUG && !networking) { RCTLogError(@"No suitable image URL loader found for %@. You may need to " " import the RCTNetwork library in order to load images.", request.URL.absoluteString); return NULL; } - RCTNetworking *networking = [_moduleRegistry moduleForName:"Networking"]; - if (!networking) { - networking = [_turboModuleRegistry moduleForName:"Networking"]; - } - // Check if networking module can load image if (RCT_DEBUG && ![networking canHandleRequest:request]) { RCTLogError(@"No suitable image URL loader found for %@", request.URL.absoluteString);