handle null error response

This commit is contained in:
Jake McDermott
2019-01-07 07:23:41 -05:00
parent 48e1fbfb38
commit cb0367ac28

View File

@@ -48,7 +48,7 @@ class AWXLogin extends Component {
try {
await api.login(username, password);
} catch (error) {
if (error.response.status === 401) {
if (error.response && error.response.status === 401) {
this.setState({ isInputValid: false });
}
} finally {