Skip to content

Commit

Permalink
Fix ios check and array destructuring bug #2853
Browse files Browse the repository at this point in the history
  • Loading branch information
davepack committed Oct 31, 2017
1 parent 5c533df commit ed2fc9a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/views/SafeAreaView.js
Expand Up @@ -84,7 +84,7 @@ class SafeView extends Component {
render() {
const { forceInset = false, isLandscape, children, style } = this.props;

if (!Platform.OS === 'ios') {
if (Platform.OS !== 'ios') {
return <View style={style}>{this.props.children}</View>;
}

Expand Down Expand Up @@ -187,8 +187,7 @@ class SafeView extends Component {
case 'right':
case 'top':
case 'bottom': {
const [firstLtr] = key;
const padding = `padding${firstLtr.toUpperCase()}${key.slice(1)}`;
const padding = `padding${key[0].toUpperCase()}${key.slice(1)}`;
style[padding] = inset;
break;
}
Expand Down

0 comments on commit ed2fc9a

Please sign in to comment.