Skip to content

Commit

Permalink
Fix ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode c…
Browse files Browse the repository at this point in the history
…heck (#38639)

Summary:
Pull Request resolved: #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
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Jul 27, 2023
1 parent e37e530 commit 75b8b10
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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'));
Expand Down

0 comments on commit 75b8b10

Please sign in to comment.