From 75b8b1076570d14e95ae655693eb2f17858187a0 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Thu, 27 Jul 2023 07:28:56 -0700 Subject: [PATCH] Fix ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode check (#38639) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38639 `ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode` is a function, we should call it. Changelog: [Internal] - Fix ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode check Reviewed By: luluwu2032 Differential Revision: D47798910 fbshipit-source-id: 68c75069f400f0a0327b1c3a5dd2b1cbfc2e70c7 --- .../react-native/Libraries/ReactNative/BridgelessUIManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js b/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js index bcc3a984b22..38b63e7baa0 100644 --- a/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js +++ b/packages/react-native/Libraries/ReactNative/BridgelessUIManager.js @@ -31,7 +31,7 @@ function getCachedConstants(): Object { module.exports = { getViewManagerConfig: (viewManagerName: string): mixed => { - if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode) { + if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) { return getCachedConstants()[viewManagerName]; } else { console.error( @@ -46,7 +46,7 @@ module.exports = { return unstable_hasComponent(viewManagerName); }, getConstants: (): Object => { - if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode) { + if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) { return getCachedConstants(); } else { console.error(errorMessageForMethod('getConstants'));