From 3bf5b5085d35525fbadc54c4fd1682790ddd343c Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Mon, 20 Nov 2023 06:25:28 -0800 Subject: [PATCH] Fix ReactInstanceManager to add getJSIModule() as an alternate path (#41495) Summary: Fix ReactInstanceManager for adding the callsite of `getJSIModule()` as an alternate path to new way of Fabric initialization in order to make Catalyst and RN-Tester work with the changes for Fabric initialization Reviewed By: javache Differential Revision: D51338036 --- .../src/main/java/com/facebook/react/ReactInstanceManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index 2ae69e229714bb..6a4c0df440d9a1 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -1407,9 +1407,10 @@ private ReactApplicationContext createReactContext( reactContext, catalystInstance.getJavaScriptContextHolder())); } if (ReactFeatureFlags.enableFabricRenderer) { - catalystInstance.getJSIModule(JSIModuleType.UIManager); if (mUIManagerProvider != null) { catalystInstance.setFabricUIManager(mUIManagerProvider.createUIManager(reactContext)); + } else { + catalystInstance.getJSIModule(JSIModuleType.UIManager); } } if (mBridgeIdleDebugListener != null) {