From 7d9e902d72e240f54ea01225cc3272698ff70014 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Thu, 11 Jan 2018 18:34:32 -0800 Subject: [PATCH] Proper check for RCTRootShadowView in RCTUIManager Summary: Because setting `intrinsicContentSize` for `RCTSurfaceRootView` doesn't have much sense. Reviewed By: mmmulani Differential Revision: D6701107 fbshipit-source-id: 259cdd27339bba3e8c9f98b6ca34affeb87f298c --- React/Modules/RCTUIManager.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/React/Modules/RCTUIManager.m b/React/Modules/RCTUIManager.m index 4cefa9157ad663..a4d9bbb21e88db 100644 --- a/React/Modules/RCTUIManager.m +++ b/React/Modules/RCTUIManager.m @@ -548,7 +548,10 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTRootShadowView * }); } - if (RCTIsReactRootView(reactTag)) { + if ( + RCTIsReactRootView(reactTag) && + [shadowView isKindOfClass:[RCTRootShadowView class]] + ) { CGSize contentSize = shadowView.frame.size; RCTExecuteOnMainQueue(^{