bookworm-react icon indicating copy to clipboard operation
bookworm-react copied to clipboard

× TypeError: Cannot read property 'catch' of undefined

Open VirendraArekar opened this issue 5 years ago • 1 comments

TypeError: Cannot read property 'catch' of undefined

LoginForm.onSubmit C:/xampp/htdocs/bookworm-app/src/component/Forms/LoginForm.js:27

this.setState({ errors }); if (Object.keys(errors).length === 0) { this.setState({ loading: true }); this.props .submit(this.state.data) .catch(err =>this.setState({ errors: err.response.data.errors, loading: false })); }

VirendraArekar avatar Sep 17 '19 12:09 VirendraArekar

image From the actual video, played around with the curly braces and fixed it, hope it helps.

ncsereoka avatar Feb 08 '20 19:02 ncsereoka