Skip to content

Commit

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

Summary:
`ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode` is a function, we should call it.
Changelog: [Internal] - Fix ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode check

Differential Revision: D47798910

fbshipit-source-id: 181f71400d059298edfce0e51256c0b7d575a475
  • Loading branch information
dmytrorykun authored and facebook-github-bot committed Jul 26, 2023
1 parent 3c6dbec commit 99f2867
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 99f2867

Please sign in to comment.