fix possible trim error on first run email entry

This commit is contained in:
Akinwale Ariwodola 2019-12-18 12:16:34 +01:00
parent dd7f1e82ba
commit d52436e8d4

View file

@ -309,7 +309,7 @@ class FirstRunScreen extends React.PureComponent {
onEmailChanged = email => {
this.setState({ email });
if (Constants.FIRST_RUN_PAGE_EMAIL_COLLECT === this.state.currentPage) {
this.setState({ showSkip: !email || email.trim().length === 0 });
this.setState({ showSkip: !email || typeof email !== 'string' || email.trim().length === 0 });
} else {
this.setState({ showSkip: false });
}