From 314d727ed19f2e1bdd3e6b3f2e735d4c9a8f9779 Mon Sep 17 00:00:00 2001 From: Brian Zhao Date: Tue, 18 Jun 2019 12:26:43 -0700 Subject: [PATCH] Check nativeCallSyncHook on both dev and ship --- Libraries/ReactNative/UIManager.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Libraries/ReactNative/UIManager.js b/Libraries/ReactNative/UIManager.js index 98305d913b9f53..d74baad9446b2e 100644 --- a/Libraries/ReactNative/UIManager.js +++ b/Libraries/ReactNative/UIManager.js @@ -59,10 +59,8 @@ UIManager.getViewManagerConfig = function(viewManagerName: string) { // If we're in the Chrome Debugger, let's not even try calling the sync // method. - if (__DEV__) { - if (!global.nativeCallSyncHook) { - return config; - } + if (!global.nativeCallSyncHook) { + return config; } if (UIManager.lazilyLoadView && !triedLoadingConfig.has(viewManagerName)) { @@ -155,7 +153,7 @@ if ( } } -if (__DEV__) { +if (!global.nativeCallSyncHook) { Object.keys(UIManager).forEach(viewManagerName => { if (!UIManagerProperties.includes(viewManagerName)) { if (!viewManagerConfigs[viewManagerName]) {