mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Allow empty response, again
Missed in #1128, this fixes the rest of the handler to not expect a body from the request. Fixes #1124 again.
This commit is contained in:
parent
3b396019ab
commit
c901675b41
2 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ var StudentRegistration = intl.injectIntl(React.createClass({
|
|||
if (body[0] && body[0].success) return this.advanceStep(formData);
|
||||
this.setState({
|
||||
registrationError:
|
||||
body[0].msg ||
|
||||
(body[0] && body[0].msg) ||
|
||||
this.props.intl.formatMessage({id: 'registration.generalError'}) + ' (' + res.statusCode + ')'
|
||||
});
|
||||
}.bind(this));
|
||||
|
|
|
@ -75,7 +75,7 @@ var TeacherRegistration = React.createClass({
|
|||
}
|
||||
this.setState({
|
||||
registrationError:
|
||||
body[0].msg ||
|
||||
(body[0] && body[0].msg) ||
|
||||
this.props.intl.formatMessage({id: 'registration.generalError'}) + ' (' + res.statusCode + ')'
|
||||
});
|
||||
}.bind(this));
|
||||
|
|
Loading…
Reference in a new issue