Skip to content

Commit

Permalink
Proper check for RCTRootShadowView in RCTUIManager
Browse files Browse the repository at this point in the history
Summary: Because setting `intrinsicContentSize` for `RCTSurfaceRootView` doesn't have much sense.

Reviewed By: mmmulani

Differential Revision: D6701107

fbshipit-source-id: 259cdd27339bba3e8c9f98b6ca34affeb87f298c
  • Loading branch information
shergin authored and facebook-github-bot committed Jan 12, 2018
1 parent a580a44 commit 7d9e902
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion React/Modules/RCTUIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,10 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView *
});
}

if (RCTIsReactRootView(reactTag)) {
if (
RCTIsReactRootView(reactTag) &&
[shadowView isKindOfClass:[RCTRootShadowView class]]
) {
CGSize contentSize = shadowView.frame.size;

RCTExecuteOnMainQueue(^{
Expand Down

0 comments on commit 7d9e902

Please sign in to comment.