Skip to content

Commit c529b62

Browse files
authored
Fixes crash using Release mode on 0.49
Because View.propTypes no longer exists in React Native 0.49, View.propTypes.style throws an exception for any app using React Native > 0.49. Should use ViewPropTypes.style instead. This doesn't happen in dev mode, only in release.
1 parent a51db9d commit c529b62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

KeyboardSpacer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
LayoutAnimation,
99
View,
1010
Dimensions,
11+
ViewPropTypes,
1112
Platform,
1213
StyleSheet
1314
} from 'react-native';
@@ -38,7 +39,7 @@ export default class KeyboardSpacer extends Component {
3839
static propTypes = {
3940
topSpacing: PropTypes.number,
4041
onToggle: PropTypes.func,
41-
style: View.propTypes.style,
42+
style: ViewPropTypes.style,
4243
};
4344

4445
static defaultProps = {

0 commit comments

Comments
 (0)