Fix Log-in Outside Lighthouse Crash The App
Summary: The `error` was not recognized as a string and React was not happy about it. Change the `error` to a string explicitly. Also, add space between the error and the form box. Reviewed By: jknoxville Differential Revision: D18829862 fbshipit-source-id: 0474d411a95bab4bc4f62a3f3d3839029938a9e6
This commit is contained in:
committed by
Facebook Github Bot
parent
186af77f62
commit
94ce34066b
@@ -80,7 +80,7 @@ class SignInSheet extends Component<Props, State> {
|
||||
this.props.onHide();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
this.setState({token: '', loading: false, error});
|
||||
this.setState({token: '', loading: false, error: `${error}`});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -103,6 +103,7 @@ class SignInSheet extends Component<Props, State> {
|
||||
value={this.state.token}
|
||||
onChange={e => this.setState({token: e.target.value})}
|
||||
/>
|
||||
<br />
|
||||
{this.state.error && (
|
||||
<InfoText color={colors.red}>
|
||||
<strong>Error:</strong> {this.state.error}
|
||||
|
||||
Reference in New Issue
Block a user