Prevent crash

pull/161/head
M66B 5 years ago
parent 8a47247486
commit cdf95f7040

@ -274,11 +274,8 @@ public class FragmentIdentity extends FragmentBase {
@Override
public void afterTextChanged(Editable editable) {
String email = editable.toString();
if (email.contains("@"))
etDomain.setText(email.split("@")[1]);
else
etDomain.setText(null);
String[] email = editable.toString().split("@");
etDomain.setText(email.length < 2 ? null : email[1]);
}
});

Loading…
Cancel
Save