Add null check to iOS tooltip (#1484)

This commit is contained in:
Harrison Healey 2018-03-07 14:52:31 +00:00 committed by GitHub
parent d0d9103857
commit 6293d3d5e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,10 @@ export default class OptionsContext extends PureComponent {
};
hide = () => {
this.refs.toolTip.hideMenu();
if (this.refs.toolTip) {
this.refs.toolTip.hideMenu();
}
this.setState({
actions: this.props.actions,
});
@ -71,7 +74,9 @@ export default class OptionsContext extends PureComponent {
actions: nextActions,
});
this.refs.toolTip.showMenu();
if (this.refs.toolTip) {
this.refs.toolTip.showMenu();
}
};
handlePress = () => {