From cae253427a223c4e8df2aa9798e2f90da98c1e9e Mon Sep 17 00:00:00 2001 From: Slobodan Predolac Date: Tue, 30 Oct 2018 14:39:37 -0700 Subject: [PATCH] Fix the lazily LaodedView to avoid weird naming issues Summary: Fix the lazily LaodedView to avoid weird naming issues This makes more sense. i would like to not have this suffix Manager at all in play, but it is possible that some of the names should be tweaked for that. Since TurboModule is coming we should probably not invest in that removal. Reviewed By: dshahidehpour Differential Revision: D12831482 fbshipit-source-id: 1cc557cf0bdfaca35032f75823b2facb778dc3ac --- React/Modules/RCTUIManager.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index e1b5dbc7d..18a2201dd 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -1565,8 +1565,12 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(lazilyLoadView:(NSString *)name) return @{}; } - NSString *moduleName = [name stringByAppendingString:@"Manager"]; + NSString *moduleName = name; BOOL result = [delegate bridge:self.bridge didNotFindModule:moduleName]; + if (!result) { + moduleName = [name stringByAppendingString:@"Manager"]; + result = [delegate bridge:self.bridge didNotFindModule:moduleName]; + } if (!result) { return @{}; }