Cosmetic refactoring and removing no-op condition of set state

Этот коммит содержится в:
nickago
2015-08-07 11:21:39 -07:00
родитель e01cae5c09
Коммит f61e093b53
2 изменённых файлов: 20 добавлений и 15 удалений

Просмотреть файл

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