Skip to content

Commit

Permalink
fix: add hasTwoStates iOS check (#1151)
Browse files Browse the repository at this point in the history
Added check for Platform concerning `NativeScreenNavigationContainer` in the proper place since the component is used directly.
  • Loading branch information
burakgormek authored Sep 27, 2021
1 parent 611ea5a commit eb0650b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ const ScreensNativeModules = {
get NativeScreenNavigationContainer() {
NativeScreenNavigationContainerValue =
NativeScreenNavigationContainerValue ||
requireNativeComponent('RNSScreenNavigationContainer');
(Platform.OS === 'ios'
? requireNativeComponent('RNSScreenNavigationContainer')
: this.NativeScreenContainer);
return NativeScreenNavigationContainerValue;
},

Expand Down Expand Up @@ -331,10 +333,7 @@ module.exports = {
},

get NativeScreenNavigationContainer() {
if (Platform.OS === 'ios') {
return ScreensNativeModules.NativeScreenNavigationContainer;
}
return ScreensNativeModules.NativeScreenContainer;
return ScreensNativeModules.NativeScreenNavigationContainer;
},

get ScreenStack() {
Expand Down

0 comments on commit eb0650b

Please sign in to comment.