Skip to content

Commit d7865eb

Browse files
Mehdi Mulanifacebook-github-bot
authored andcommitted
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
1 parent fba7c1e commit d7865eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

React/Modules/RCTUIManager.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,10 @@ static void RCTMeasureLayout(RCTShadowView *view,
15301530
// which had RCT Prefixes stripped. Lets check one more time...
15311531
module = [self.bridge moduleForName:RCTDropReactPrefixes(moduleName)];
15321532
}
1533+
1534+
if (!module) {
1535+
return @{};
1536+
}
15331537

15341538
RCTComponentData *componentData = [[RCTComponentData alloc] initWithManagerClass:[module class] bridge:self.bridge];
15351539
_componentDataByName[componentData.name] = componentData;

0 commit comments

Comments
 (0)