mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Merge pull request #1129 from rschamp/bugfix/1124
Allow empty response, again
This commit is contained in:
commit
cfc962adc1
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);
|
if (body[0] && body[0].success) return this.advanceStep(formData);
|
||||||
this.setState({
|
this.setState({
|
||||||
registrationError:
|
registrationError:
|
||||||
body[0].msg ||
|
(body[0] && body[0].msg) ||
|
||||||
this.props.intl.formatMessage({id: 'registration.generalError'}) + ' (' + res.statusCode + ')'
|
this.props.intl.formatMessage({id: 'registration.generalError'}) + ' (' + res.statusCode + ')'
|
||||||
});
|
});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
|
@ -75,7 +75,7 @@ var TeacherRegistration = React.createClass({
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
registrationError:
|
registrationError:
|
||||||
body[0].msg ||
|
(body[0] && body[0].msg) ||
|
||||||
this.props.intl.formatMessage({id: 'registration.generalError'}) + ' (' + res.statusCode + ')'
|
this.props.intl.formatMessage({id: 'registration.generalError'}) + ' (' + res.statusCode + ')'
|
||||||
});
|
});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
Loading…
Reference in a new issue