Browse files

Add another guard to lazilyLoadView

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
  • Loading branch information...
mmmulani authored and facebook-github-bot committed Nov 9, 2018
1 parent fba7c1e commit d7865ebde879983b355d6f6e64232e4bd264081d
Showing with 4 additions and 0 deletions.
  1. +4 −0 React/Modules/RCTUIManager.m
@@ -1530,6 +1530,10 @@ static void RCTMeasureLayout(RCTShadowView *view,
// 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;

0 comments on commit d7865eb

Please sign in to comment.