mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #1128 from rschamp/bugfix/1124
Allow empty responses
This commit is contained in:
commit
9c8a7d5401
2 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ var StudentRegistration = intl.injectIntl(React.createClass({
|
|||
}, function (err, body, res) {
|
||||
this.setState({waiting: false});
|
||||
if (err) return this.setState({registrationError: err});
|
||||
if (body[0].success) return this.advanceStep(formData);
|
||||
if (body[0] && body[0].success) return this.advanceStep(formData);
|
||||
this.setState({
|
||||
registrationError:
|
||||
body[0].msg ||
|
||||
|
|
|
@ -69,7 +69,7 @@ var TeacherRegistration = React.createClass({
|
|||
}, function (err, body, res) {
|
||||
this.setState({waiting: false});
|
||||
if (err) return this.setState({registrationError: err});
|
||||
if (body[0].success) {
|
||||
if (body[0] && body[0].success) {
|
||||
this.props.dispatch(sessionActions.refreshSession());
|
||||
return this.advanceStep(formData);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue