Skip to content

Commit 02a0253

Browse files
committed
Make nativeFabricUIManager optional
1 parent b0671f9 commit 02a0253

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/react-native-renderer/src/ReactFabric.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import getComponentNameFromType from 'shared/getComponentNameFromType';
4747
const {
4848
dispatchCommand: fabricDispatchCommand,
4949
sendAccessibilityEvent: fabricSendAccessibilityEvent,
50-
} = nativeFabricUIManager;
50+
} = nativeFabricUIManager ?? {};
5151

5252
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
5353

packages/react-native-renderer/src/ReactFabricGlobalResponderHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Module provided by RN:
1111
import {UIManager} from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface';
1212

13-
const {setIsJSResponder} = nativeFabricUIManager;
13+
const {setIsJSResponder} = nativeFabricUIManager ?? {};
1414

1515
const ReactFabricGlobalResponderHandler = {
1616
onChange: function(from: any, to: any, blockNativeResponder: boolean) {

packages/react-native-renderer/src/ReactNativeFiberInspector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (__DEV__) {
2626
Object.freeze(emptyObject);
2727
}
2828

29-
const {measure, findNodeAtPoint} = nativeFabricUIManager;
29+
const {measure, findNodeAtPoint} = nativeFabricUIManager ?? {};
3030

3131
let createHierarchy;
3232
let getHostNode;

packages/react-native-renderer/src/ReactNativeRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
5252
const {
5353
sendAccessibilityEvent: fabricSendAccessibilityEvent,
5454
dispatchCommand: fabricDispatchCommand,
55-
} = nativeFabricUIManager;
55+
} = nativeFabricUIManager ?? {};
5656

5757
function findHostInstance_DEPRECATED(
5858
componentOrHandle: any,

0 commit comments

Comments
 (0)