Only dispatch password_changed when password has changed
This commit is contained in:
@@ -38,7 +38,7 @@ export default React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onPasswordChanged: function() {
|
_onPasswordChanged: function() {
|
||||||
this.props.onFinished();
|
this.props.onFinished(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPasswordChangeError: function(err) {
|
_onPasswordChangeError: function(err) {
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ export default React.createClass({
|
|||||||
onUpdateClicked: function() {
|
onUpdateClicked: function() {
|
||||||
const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
|
const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
|
||||||
Modal.createDialog(SetPasswordDialog, {
|
Modal.createDialog(SetPasswordDialog, {
|
||||||
onFinished: () => {
|
onFinished: (passwordChanged) => {
|
||||||
|
if (!passwordChanged) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Notify SessionStore that the user's password was changed
|
// Notify SessionStore that the user's password was changed
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'password_changed',
|
action: 'password_changed',
|
||||||
|
|||||||
Reference in New Issue
Block a user