diff options
author | nickago <ngonella@calpoly.edu> | 2015-08-07 11:21:39 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-08-11 13:33:08 -0700 |
commit | f61e093b53c8e18cd3365b8f0bb03ffadb6422ef (patch) | |
tree | 551d3013f9e61e285dfd4949ae496cb4e48b7e9b /web/react/components/user_settings.jsx | |
parent | e01cae5c0965371efa8179abf10434d12dfd5843 (diff) | |
download | chat-f61e093b53c8e18cd3365b8f0bb03ffadb6422ef.tar.gz chat-f61e093b53c8e18cd3365b8f0bb03ffadb6422ef.tar.bz2 chat-f61e093b53c8e18cd3365b8f0bb03ffadb6422ef.zip |
Cosmetic refactoring and removing no-op condition of set state
Diffstat (limited to 'web/react/components/user_settings.jsx')
-rw-r--r-- | web/react/components/user_settings.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx index d0ce23639..ed4f3fd98 100644 --- a/web/react/components/user_settings.jsx +++ b/web/react/components/user_settings.jsx @@ -524,12 +524,13 @@ var SecurityTab = React.createClass({ $(this.getDOMNode()).find('.form-control').each(function() { this.value = ''; }); + this.setState({current_password: '', new_password: '', confirm_password: '', server_error: null, password_error: null}); if (!this.state.willReturn) { this.props.updateTab('general'); + } else { + this.setState({willReturn: false}); } - - this.setState({current_password: '', new_password: '', confirm_password: '', server_error: null, password_error: null, willReturn: false}); }, componentDidMount: function() { $('#user_settings1').on('hidden.bs.modal', this.handleClose); |