mirror of
https://github.com/status-im/react-native.git
synced 2025-02-21 21:58:18 +00:00
Add another guard to lazilyLoadView
Summary: it's possible that moduleForName won't return anything, so we should return. Created from Diffusion's 'Open in Editor' feature. Reviewed By: spredolac Differential Revision: D12963342 fbshipit-source-id: c059595a68bfcaa38221e05fb62d70cc29887ca7
This commit is contained in:
parent
fba7c1ece2
commit
d7865ebde8
@ -1530,6 +1530,10 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(lazilyLoadView:(NSString *)name)
|
||||
// which had RCT Prefixes stripped. Lets check one more time...
|
||||
module = [self.bridge moduleForName:RCTDropReactPrefixes(moduleName)];
|
||||
}
|
||||
|
||||
if (!module) {
|
||||
return @{};
|
||||
}
|
||||
|
||||
RCTComponentData *componentData = [[RCTComponentData alloc] initWithManagerClass:[module class] bridge:self.bridge];
|
||||
_componentDataByName[componentData.name] = componentData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user