Check to make sure passwords aren't blank

pull/1/head
Erik Johnston 2015-07-16 10:43:16 +01:00
parent ca593b8544
commit 3555f35737
1 changed files with 5 additions and 0 deletions

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