Skip to content

Commit

Permalink
Fix for condition for isIphoneX
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklam718 committed Mar 28, 2019
1 parent 3707ff5 commit df7b9d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import { Dimensions, Platform } from 'react-native';
export const deviceWidth = Dimensions.get('window').width;
export const deviceHeight = Dimensions.get('window').height;
export const isIOS = Platform.OS === 'ios';
export const isIphoneX = Platform.OS === isIOS && (deviceWidth === 812 || deviceHeight === 812);
export const isIphoneX = isIOS && (deviceWidth === 812 || deviceHeight === 812);

0 comments on commit df7b9d7

Please sign in to comment.