From 94ce34066bf4928ba1f1a6ffb7edb6ff369d714c Mon Sep 17 00:00:00 2001 From: Chaiwat Ekkaewnumchai Date: Thu, 5 Dec 2019 05:43:40 -0800 Subject: [PATCH] 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 --- src/chrome/SignInSheet.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chrome/SignInSheet.tsx b/src/chrome/SignInSheet.tsx index 29be61d8d..7fb9e48eb 100644 --- a/src/chrome/SignInSheet.tsx +++ b/src/chrome/SignInSheet.tsx @@ -80,7 +80,7 @@ class SignInSheet extends Component { 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 { value={this.state.token} onChange={e => this.setState({token: e.target.value})} /> +
{this.state.error && ( Error: {this.state.error}