Check to make sure passwords aren't blank

This commit is contained in:
Erik Johnston 2015-07-16 10:43:16 +01:00
parent ca593b8544
commit 3555f35737

View File

@ -35,6 +35,11 @@ module.exports = React.createClass({
state: this.Phases.Error,
errorString: "Passwords don't match"
});
} else if (new_password == '' || old_password == '') {
this.setState({
state: this.Phases.Error,
errorString: "Passwords can't be empty"
});
} else {
this.changePassword(old_password, new_password);
}