[FIX] ProfileView input navigation error when custom fields aren't set (#1383)

This commit is contained in:
Diego Mello 2019-11-13 16:53:20 -03:00 committed by GitHub
parent 1b2833107f
commit 447b48360f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,7 @@ class ProfileView extends React.Component {
const {
name, username, email, newPassword, avatarUrl, customFields, avatar, saving, showPasswordAlert
} = this.state;
const { baseUrl, user } = this.props;
const { baseUrl, user, Accounts_CustomFields } = this.props;
return (
<KeyboardView
@ -424,7 +424,7 @@ class ProfileView extends React.Component {
value={newPassword}
onChangeText={value => this.setState({ newPassword: value })}
onSubmitEditing={() => {
if (Object.keys(customFields).length) {
if (Accounts_CustomFields && Object.keys(customFields).length) {
return this[Object.keys(customFields)[0]].focus();
}
this.avatarUrl.focus();