Merge pull request #1128 from rschamp/bugfix/1124

Allow empty responses
This commit is contained in:
Ray Schamp 2016-12-19 13:49:30 -05:00 committed by GitHub
commit 9c8a7d5401
2 changed files with 2 additions and 2 deletions

View file

@ -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 ||

View file

@ -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);
}